@@ -72,7 +72,12 @@ int qce_submit_cmd_desc(struct qce_device *qce, unsigned long flags)
unsigned long desc_flags;
int ret = 0;
- desc_flags = DMA_PREP_CMD;
+ if (flags & QCE_DMA_DESC_FLAG_LOCK)
+ desc_flags = DMA_PREP_CMD | DMA_PREP_LOCK;
+ else if (flags & QCE_DMA_DESC_FLAG_UNLOCK)
+ desc_flags = DMA_PREP_CMD | DMA_PREP_UNLOCK;
+ else
+ desc_flags = DMA_PREP_CMD;
/* For command descriptor always use consumer pipe
* it recomended as per HPG
@@ -19,6 +19,8 @@
#define QCE_BAM_CMD_ELEMENT_SIZE 64
#define QCE_DMA_DESC_FLAG_BAM_NWD (0x0004)
#define QCE_MAX_REG_READ 8
+#define QCE_DMA_DESC_FLAG_LOCK (0x0002)
+#define QCE_DMA_DESC_FLAG_UNLOCK (0x0001)
struct qce_result_dump {
u32 auth_iv[QCE_AUTHIV_REGS_CNT];
Add LOCK and UNLOCK flag support while preapring command descriptor for writing crypto register. Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> --- Change in [v2] * No change Change in [v1] * Added initial support for lock/un-lock flag drivers/crypto/qce/dma.c | 7 ++++++- drivers/crypto/qce/dma.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-)