diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2016-11-22 15:44:04 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-28 21:23:22 +0800 |
commit | db57656b0072415488a08332ba46494a5e334b37 (patch) | |
tree | a329345a7da5c9992e0a35f3f3332acc2a9dfa7e /drivers/crypto/caam/desc_constr.h | |
parent | 64c9295b2320efea5aec1d0511577e9cee06eddb (diff) |
crypto: caam - group algorithm related params
In preparation of factoring out the shared descriptors,
struct alginfo is introduced to group the algorithm related
parameters.
Signed-off-by: Horia Geantă <horia.geanta@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.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h index 354da735af62..bfef7952dfb7 100644 --- a/drivers/crypto/caam/desc_constr.h +++ b/drivers/crypto/caam/desc_constr.h @@ -430,3 +430,22 @@ do { \ APPEND_MATH_IMM_u64(LSHIFT, desc, dest, src0, src1, data) #define append_math_rshift_imm_u64(desc, dest, src0, src1, data) \ APPEND_MATH_IMM_u64(RSHIFT, desc, dest, src0, src1, data) + +/** + * struct alginfo - Container for algorithm details + * @algtype: algorithm selector; for valid values, see documentation of the + * 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_inline: true - key can be inlined in the descriptor; false - key is + * referenced by the descriptor + */ +struct alginfo { + u32 algtype; + unsigned int keylen; + unsigned int keylen_pad; + u64 key; + bool key_inline; +}; |