diff options
author | Vakul Garg <vakul@freescale.com> | 2013-07-10 02:27:21 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-07-10 02:53:28 -0400 |
commit | aa2faec1a05f1ebc2856be911f83e696f8dc2122 (patch) | |
tree | 679d4498ecf9043ab0eff70d6c3e08b975ae9e44 /drivers/crypto | |
parent | b2c311075db578f1433d9b303698491bfa21279a (diff) |
crypto: caam - Moved macro DESC_JOB_IO_LEN to desc_constr.h
DESC_JOB_IO_LEN is a generic macro which indicates the space required in
the descriptor for placing SEQIN/OUT commands, job descriptor header,
shared descriptor pointer. Moving it to descriptor construction file
which can be supposedly included by different algo offload files.
Change-Id: Ic8900990d465e9079827b0c7fcacc61766d7efb6
Signed-off-by: Vakul Garg <vakul@freescale.com>
Reviewed-by: Geanta Neag Horia Ioan-B05471 <horia.geanta@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/caam/caamalg.c | 2 | ||||
-rw-r--r-- | drivers/crypto/caam/caamhash.c | 2 | ||||
-rw-r--r-- | drivers/crypto/caam/desc_constr.h | 1 |
3 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index bf416a8391a7..7a9052c44238 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c | |||
@@ -65,8 +65,6 @@ | |||
65 | #define CAAM_MAX_IV_LENGTH 16 | 65 | #define CAAM_MAX_IV_LENGTH 16 |
66 | 66 | ||
67 | /* length of descriptors text */ | 67 | /* length of descriptors text */ |
68 | #define DESC_JOB_IO_LEN (CAAM_CMD_SZ * 5 + CAAM_PTR_SZ * 3) | ||
69 | |||
70 | #define DESC_AEAD_BASE (4 * CAAM_CMD_SZ) | 68 | #define DESC_AEAD_BASE (4 * CAAM_CMD_SZ) |
71 | #define DESC_AEAD_ENC_LEN (DESC_AEAD_BASE + 16 * CAAM_CMD_SZ) | 69 | #define DESC_AEAD_ENC_LEN (DESC_AEAD_BASE + 16 * CAAM_CMD_SZ) |
72 | #define DESC_AEAD_DEC_LEN (DESC_AEAD_BASE + 21 * CAAM_CMD_SZ) | 70 | #define DESC_AEAD_DEC_LEN (DESC_AEAD_BASE + 21 * CAAM_CMD_SZ) |
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c index 5996521a1caf..77ad2b68f8f3 100644 --- a/drivers/crypto/caam/caamhash.c +++ b/drivers/crypto/caam/caamhash.c | |||
@@ -72,8 +72,6 @@ | |||
72 | #define CAAM_MAX_HASH_DIGEST_SIZE SHA512_DIGEST_SIZE | 72 | #define CAAM_MAX_HASH_DIGEST_SIZE SHA512_DIGEST_SIZE |
73 | 73 | ||
74 | /* length of descriptors text */ | 74 | /* length of descriptors text */ |
75 | #define DESC_JOB_IO_LEN (CAAM_CMD_SZ * 5 + CAAM_PTR_SZ * 3) | ||
76 | |||
77 | #define DESC_AHASH_BASE (4 * CAAM_CMD_SZ) | 75 | #define DESC_AHASH_BASE (4 * CAAM_CMD_SZ) |
78 | #define DESC_AHASH_UPDATE_LEN (6 * CAAM_CMD_SZ) | 76 | #define DESC_AHASH_UPDATE_LEN (6 * CAAM_CMD_SZ) |
79 | #define DESC_AHASH_UPDATE_FIRST_LEN (DESC_AHASH_BASE + 4 * CAAM_CMD_SZ) | 77 | #define DESC_AHASH_UPDATE_FIRST_LEN (DESC_AHASH_BASE + 4 * CAAM_CMD_SZ) |
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h index fe3bfd1b08ca..cd5f678847ce 100644 --- a/drivers/crypto/caam/desc_constr.h +++ b/drivers/crypto/caam/desc_constr.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define CAAM_CMD_SZ sizeof(u32) | 10 | #define CAAM_CMD_SZ sizeof(u32) |
11 | #define CAAM_PTR_SZ sizeof(dma_addr_t) | 11 | #define CAAM_PTR_SZ sizeof(dma_addr_t) |
12 | #define CAAM_DESC_BYTES_MAX (CAAM_CMD_SZ * MAX_CAAM_DESCSIZE) | 12 | #define CAAM_DESC_BYTES_MAX (CAAM_CMD_SZ * MAX_CAAM_DESCSIZE) |
13 | #define DESC_JOB_IO_LEN (CAAM_CMD_SZ * 5 + CAAM_PTR_SZ * 3) | ||
13 | 14 | ||
14 | #ifdef DEBUG | 15 | #ifdef DEBUG |
15 | #define PRINT_POS do { printk(KERN_DEBUG "%02d: %s\n", desc_len(desc),\ | 16 | #define PRINT_POS do { printk(KERN_DEBUG "%02d: %s\n", desc_len(desc),\ |