crypto: caam/qi - DMA map keys using proper device
authorHoria Geantă <horia.geanta@nxp.com>
Fri, 3 May 2019 14:17:42 +0000 (17:17 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 May 2019 06:01:04 +0000 (14:01 +0800)
commita7cd942bb6e3559d86257fe3b57844e55341a3a0
treef20a41bedb2d34dd9e7645f708c6b8fba70ae686
parentb2b2ee350e701df9086275b8f857f6db10546f15
crypto: caam/qi - DMA map keys using proper device

Currently there is a mismatch b/w the ICID (Isolation Context ID) used
for DMA mapping keys and ICID used for accessing them.
-keys are DMA mapped using a job ring device, thus a job ring ICID
-keys are accessed from descriptors enqueued via Queue Interface,
thus using QI ICID

[Note: ICIDs of JRs, QI are configured by U-boot / other entity by:
-fixing up the corresponding job ring and controller DT nodes
-setting up corresponding caam ICID registers]

In order to avoid IOMMU faults, DMA map the key using the controller
device instead of a job ring device.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg_qi.c