linux/drivers/crypto/caam
Horia Geantă 67c2315def crypto: caam - add Queue Interface (QI) backend support
CAAM engine supports two interfaces for crypto job submission:
-job ring interface - already existing caam/jr driver
-Queue Interface (QI) - caam/qi driver added in current patch

QI is present in CAAM engines found on DPAA platforms.
QI gets its I/O (frame descriptors) from QMan (Queue Manager) queues.

This patch adds a platform device for accessing CAAM's queue interface.
The requests are submitted to CAAM using one frame queue per
cryptographic context. Each crypto context has one shared descriptor.
This shared descriptor is attached to frame queue associated with
corresponding driver context using context_a.

The driver hides the mechanics of FQ creation, initialisation from its
applications. Each cryptographic context needs to be associated with
driver context which houses the FQ to be used to transport the job to
CAAM. The driver provides API for:
(a) Context creation
(b) Job submission
(c) Context deletion
(d) Congestion indication - whether path to/from CAAM is congested

The driver supports affining its context to a particular CPU.
This means that any responses from CAAM for the context in question
would arrive at the given CPU. This helps in implementing one CPU
per packet round trip in IPsec application.

The driver processes CAAM responses under NAPI contexts.
NAPI contexts are instantiated only on cores with affined portals since
only cores having their own portal can receive responses from DQRR.

The responses from CAAM for all cryptographic contexts ride on a fixed
set of FQs. We use one response FQ per portal owning core. The response
FQ is configured in each core's and thus portal's dedicated channel.
This gives the flexibility to direct CAAM's responses for a crypto
context on a given core.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-03-24 22:02:59 +08:00
..
caamalg_desc.c crypto: caam - make aamalg_desc a proper module 2016-12-01 21:06:40 +08:00
caamalg_desc.h crypto: caam - refactor encryption descriptors generation 2016-11-28 21:23:23 +08:00
caamalg.c crypto: caam - fix DMA API leaks for multiple setkey() calls 2017-02-15 13:23:41 +08:00
caamhash.c crypto: caam - fix state buffer DMA (un)mapping 2017-02-15 13:23:43 +08:00
caampkc.c crypto: caam - fix sparse warnings 2016-11-13 17:45:08 +08:00
caampkc.h crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +08:00
caamrng.c crypto: caam - trivial code clean-up 2016-11-13 17:45:12 +08:00
compat.h crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +08:00
ctrl.c crypto: caam - add Queue Interface (QI) backend support 2017-03-24 22:02:59 +08:00
ctrl.h crypto: caam - fix ERA retrieval function 2014-02-09 09:59:27 +08:00
desc_constr.h crypto: caam - avoid double inclusion in desc_constr.h 2017-03-24 22:02:59 +08:00
desc.h crypto: caam - move sec4_sg_entry to sg_sw_sec4.h 2016-11-13 17:45:14 +08:00
error.c crypto: caam - don't include unneeded headers 2017-02-15 13:23:36 +08:00
error.h crypto: caam - Contain caam_jr_strstatus() ugliness 2014-05-08 21:58:06 +08:00
intern.h crypto: caam - add Queue Interface (QI) backend support 2017-03-24 22:02:59 +08:00
jr.c crypto: caam - check return code of dma_set_mask_and_coherent() 2017-02-15 13:23:37 +08:00
jr.h crypto: caam - Add API's to allocate/free Job Rings 2013-10-30 12:02:57 +08:00
Kconfig crypto: caam - make aamalg_desc a proper module 2016-12-01 21:06:40 +08:00
key_gen.c crypto: caam - consolidate split key length computation 2016-11-28 21:23:23 +08:00
key_gen.h crypto: caam - consolidate split key length computation 2016-11-28 21:23:23 +08:00
Makefile crypto: caam - add Queue Interface (QI) backend support 2017-03-24 22:02:59 +08:00
pdb.h crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +08:00
pkc_desc.c crypto: caam - add support for RSA algorithm 2016-07-05 23:05:24 +08:00
qi.c crypto: caam - add Queue Interface (QI) backend support 2017-03-24 22:02:59 +08:00
qi.h crypto: caam - add Queue Interface (QI) backend support 2017-03-24 22:02:59 +08:00
regs.h crypto: caam - treat SGT address pointer as u64 2016-10-02 22:33:45 +08:00
sg_sw_sec4.h crypto: caam - replace sg_count() with sg_nents_for_len() 2017-02-15 13:23:39 +08:00