crypto: marvell - Add support for chaining crypto requests in TDMA mode
authorRomain Perier <romain.perier@free-electrons.com>
Tue, 21 Jun 2016 08:08:39 +0000 (10:08 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 Jun 2016 10:29:51 +0000 (18:29 +0800)
commit85030c5168f1df03a164d47254cc785331f1dfe2
tree0d8f0077d43d48359535f064cdb0626069c66592
parentbf8f91e711926c1fb57629338e30164ecfba9700
crypto: marvell - Add support for chaining crypto requests in TDMA mode

The Cryptographic Engines and Security Accelerators (CESA) supports the
Multi-Packet Chain Mode. With this mode enabled, multiple tdma requests
can be chained and processed by the hardware without software
intervention. This mode was already activated, however the crypto
requests were not chained together. By doing so, we reduce significantly
the number of IRQs. Instead of being interrupted at the end of each
crypto request, we are interrupted at the end of the last cryptographic
request processed by the engine.

This commits re-factorizes the code, changes the code architecture and
adds the required data structures to chain cryptographic requests
together before sending them to an engine (stopped or possibly already
running).

Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/cesa.c
drivers/crypto/marvell/cesa.h
drivers/crypto/marvell/cipher.c
drivers/crypto/marvell/hash.c
drivers/crypto/marvell/tdma.c