]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: nx - add hardware 842 crypto comp alg
authorDan Streetman <ddstreet@ieee.org>
Thu, 7 May 2015 17:49:21 +0000 (13:49 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 11 May 2015 07:06:48 +0000 (15:06 +0800)
commit36b86a9c2a1e9b62d021a32e749b628641adf749
tree1ab8c03ff10b05133a8875913d027cb77836ad5a
parent231833ad59e1ccfbcd7522041dc3f616d556b5e4
crypto: nx - add hardware 842 crypto comp alg

Add crypto compression alg for 842 hardware compression and decompression,
using the alg name "842" and driver_name "842-nx".

This uses only the PowerPC coprocessor hardware for 842 compression.  It
also uses the hardware for decompression, but if the hardware fails it will
fall back to the 842 software decompression library, so that decompression
never fails (for valid 842 compressed buffers).  A header must be used in
most cases, due to the hardware's restrictions on the buffers being
specifically aligned and sized.

Due to the header this driver adds, compressed buffers it creates cannot be
directly passed to the 842 software library for decompression.  However,
compressed buffers created by the software 842 library can be passed to
this driver for hardware 842 decompression (with the exception of buffers
containing the "short data" template, as lib/842/842.h explains).

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/Kconfig
drivers/crypto/nx/Makefile
drivers/crypto/nx/nx-842-crypto.c [new file with mode: 0644]