summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam/desc_constr.h
diff options
context:
space:
mode:
authorAndrei Varvara <andrei.varvara@freescale.com>2013-05-28 11:37:05 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2013-05-28 11:37:05 +0400
commite2d4ea9444024e38217e4b7e380c6b9f39f9a5f2 (patch)
tree8a9f6eefa6e23b361b1806bc732c285c2bbbf379 /drivers/crypto/caam/desc_constr.h
parent74d24d838be0ee64c1085558238e5c51e1659817 (diff)
downloadlinux-e2d4ea9444024e38217e4b7e380c6b9f39f9a5f2.tar.xz
crypto: caam - fix SEQ IN PTR command when RTO or PRE bit is set
SEQ IN PTR command does not require pointer if RTO or PRE bit is set Updated desc_constr.h accordingly. Signed-off-by: Andrei Varvara <andrei.varvara@freescale.com> Reviewed-by: Phillips Kim-R1AAHA <Kim.Phillips@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h
index c85c1f058401..19501b548db4 100644
--- a/drivers/crypto/caam/desc_constr.h
+++ b/drivers/crypto/caam/desc_constr.h
@@ -122,7 +122,8 @@ static inline void append_cmd_ptr_extlen(u32 *desc, dma_addr_t ptr,
unsigned int len, u32 command)
{
append_cmd(desc, command);
- append_ptr(desc, ptr);
+ if (!(command & (SQIN_RTO | SQIN_PRE)))
+ append_ptr(desc, ptr);
append_cmd(desc, len);
}
@@ -186,7 +187,10 @@ static inline void append_seq_##cmd##_ptr_intlen(u32 *desc, dma_addr_t ptr, \
u32 options) \
{ \
PRINT_POS; \
- append_cmd_ptr(desc, ptr, len, CMD_SEQ_##op##_PTR | options); \
+ if (options & (SQIN_RTO | SQIN_PRE)) \
+ append_cmd(desc, CMD_SEQ_##op##_PTR | len | options); \
+ else \
+ append_cmd_ptr(desc, ptr, len, CMD_SEQ_##op##_PTR | options); \
}
APPEND_SEQ_PTR_INTLEN(in, IN)
APPEND_SEQ_PTR_INTLEN(out, OUT)