summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam/desc_constr.h
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2019-07-31 16:08:10 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-08-09 08:11:49 +0300
commita2fb864c042b00debc7696d4459d8058ec7c8013 (patch)
treefa78e4d9cbd62a980b75311b6d9db9dfbd4dc58d /drivers/crypto/caam/desc_constr.h
parentd28a43edf3caff971b58d75c83ad00487152e448 (diff)
downloadlinux-a2fb864c042b00debc7696d4459d8058ec7c8013.tar.xz
crypto: caam - keep both virtual and dma key addresses
Update alginfo struct to keep both virtual and dma key addresses, so that descriptors have them at hand. One example where this is needed is in the xcbc(aes) shared descriptors, which are updated in current patch. Another example is the upcoming fix for DKP. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/desc_constr.h')
-rw-r--r--drivers/crypto/caam/desc_constr.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h
index 5988a26a2441..815417411a18 100644
--- a/drivers/crypto/caam/desc_constr.h
+++ b/drivers/crypto/caam/desc_constr.h
@@ -457,8 +457,8 @@ do { \
* functions where it is used.
* @keylen: length of the provided algorithm key, in bytes
* @keylen_pad: padded length of the provided algorithm key, in bytes
- * @key: address where algorithm key resides; virtual address if key_inline
- * is true, dma (bus) address if key_inline is false.
+ * @key_dma: dma (bus) address where algorithm key resides
+ * @key_virt: virtual address where algorithm key resides
* @key_inline: true - key can be inlined in the descriptor; false - key is
* referenced by the descriptor
*/
@@ -466,10 +466,8 @@ struct alginfo {
u32 algtype;
unsigned int keylen;
unsigned int keylen_pad;
- union {
- dma_addr_t key_dma;
- const void *key_virt;
- };
+ dma_addr_t key_dma;
+ const void *key_virt;
bool key_inline;
};