diff options
author | Tudor Ambarus <tudor-dan.ambarus@nxp.com> | 2016-07-04 13:12:08 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-07-05 18:05:24 +0300 |
commit | 8c419778ab57e497b5de1352aa39dbe2efb3ed54 (patch) | |
tree | b9977075029d6d46cc1ae2e743e7df9bde0bd1c3 /drivers/crypto/caam/desc_constr.h | |
parent | 57763f5ec7488d5864e4d6ec9d4197b8f52214bd (diff) | |
download | linux-8c419778ab57e497b5de1352aa39dbe2efb3ed54.tar.xz |
crypto: caam - add support for RSA algorithm
Add RSA support to caam driver.
Initial author is Yashpal Dutta <yashpal.dutta@freescale.com>.
Signed-off-by: Tudor Ambarus <tudor-dan.ambarus@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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h index ae3aef6e9fee..d3869b95e7b1 100644 --- a/drivers/crypto/caam/desc_constr.h +++ b/drivers/crypto/caam/desc_constr.h @@ -77,6 +77,13 @@ static inline void init_job_desc(u32 *desc, u32 options) init_desc(desc, CMD_DESC_HDR | options); } +static inline void init_job_desc_pdb(u32 *desc, u32 options, size_t pdb_bytes) +{ + u32 pdb_len = (pdb_bytes + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; + + init_job_desc(desc, (((pdb_len + 1) << HDR_START_IDX_SHIFT)) | options); +} + static inline void append_ptr(u32 *desc, dma_addr_t ptr) { dma_addr_t *offset = (dma_addr_t *)desc_end(desc); |