diff options
Diffstat (limited to 'drivers/crypto/caam/desc_constr.h')
-rw-r--r-- | drivers/crypto/caam/desc_constr.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h index 19501b548db4..fc4470a2c337 100644 --- a/drivers/crypto/caam/desc_constr.h +++ b/drivers/crypto/caam/desc_constr.h | |||
@@ -177,10 +177,26 @@ static inline void append_##cmd(u32 *desc, dma_addr_t ptr, unsigned int len, \ | |||
177 | } | 177 | } |
178 | APPEND_CMD_PTR(key, KEY) | 178 | APPEND_CMD_PTR(key, KEY) |
179 | APPEND_CMD_PTR(load, LOAD) | 179 | APPEND_CMD_PTR(load, LOAD) |
180 | APPEND_CMD_PTR(store, STORE) | ||
181 | APPEND_CMD_PTR(fifo_load, FIFO_LOAD) | 180 | APPEND_CMD_PTR(fifo_load, FIFO_LOAD) |
182 | APPEND_CMD_PTR(fifo_store, FIFO_STORE) | 181 | APPEND_CMD_PTR(fifo_store, FIFO_STORE) |
183 | 182 | ||
183 | static inline void append_store(u32 *desc, dma_addr_t ptr, unsigned int len, | ||
184 | u32 options) | ||
185 | { | ||
186 | u32 cmd_src; | ||
187 | |||
188 | cmd_src = options & LDST_SRCDST_MASK; | ||
189 | |||
190 | append_cmd(desc, CMD_STORE | options | len); | ||
191 | |||
192 | /* The following options do not require pointer */ | ||
193 | if (!(cmd_src == LDST_SRCDST_WORD_DESCBUF_SHARED || | ||
194 | cmd_src == LDST_SRCDST_WORD_DESCBUF_JOB || | ||
195 | cmd_src == LDST_SRCDST_WORD_DESCBUF_JOB_WE || | ||
196 | cmd_src == LDST_SRCDST_WORD_DESCBUF_SHARED_WE)) | ||
197 | append_ptr(desc, ptr); | ||
198 | } | ||
199 | |||
184 | #define APPEND_SEQ_PTR_INTLEN(cmd, op) \ | 200 | #define APPEND_SEQ_PTR_INTLEN(cmd, op) \ |
185 | static inline void append_seq_##cmd##_ptr_intlen(u32 *desc, dma_addr_t ptr, \ | 201 | static inline void append_seq_##cmd##_ptr_intlen(u32 *desc, dma_addr_t ptr, \ |
186 | unsigned int len, \ | 202 | unsigned int len, \ |