| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | From fafd87f0b6bc388b811e342ff83c88212041b119 Mon Sep 17 00:00:00 2001 |
| 2 | From: Radu Alexe <radu.alexe@nxp.com> |
| 3 | Date: Tue, 6 Jun 2017 12:23:56 +0300 |
| 4 | Subject: [PATCH] crypto: caam - add support for MOVEB command |
| 5 | |
| 6 | CHAs of SEC work natively in BE mode. When moving |
| 7 | data to the alignment blocks, swapping is needed |
| 8 | for LE platforms. This is done by means of the MOVEB |
| 9 | command. This patch adds support |
| 10 | to DCL for this command. |
| 11 | |
| 12 | Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com> |
| 13 | Signed-off-by: Radu Alexe <radu.alexe@nxp.com> |
| 14 | --- |
| 15 | drivers/crypto/caam/desc.h | 1 + |
| 16 | drivers/crypto/caam/desc_constr.h | 1 + |
| 17 | 2 files changed, 2 insertions(+) |
| 18 | |
| 19 | --- a/drivers/crypto/caam/desc.h |
| 20 | +++ b/drivers/crypto/caam/desc.h |
| 21 | @@ -43,6 +43,7 @@ |
| 22 | #define CMD_SEQ_LOAD (0x03 << CMD_SHIFT) |
| 23 | #define CMD_FIFO_LOAD (0x04 << CMD_SHIFT) |
| 24 | #define CMD_SEQ_FIFO_LOAD (0x05 << CMD_SHIFT) |
| 25 | +#define CMD_MOVEB (0x07 << CMD_SHIFT) |
| 26 | #define CMD_STORE (0x0a << CMD_SHIFT) |
| 27 | #define CMD_SEQ_STORE (0x0b << CMD_SHIFT) |
| 28 | #define CMD_FIFO_STORE (0x0c << CMD_SHIFT) |
| 29 | --- a/drivers/crypto/caam/desc_constr.h |
| 30 | +++ b/drivers/crypto/caam/desc_constr.h |
| 31 | @@ -240,6 +240,7 @@ static inline u32 *append_##cmd(u32 * co |
| 32 | APPEND_CMD_RET(jump, JUMP) |
| 33 | APPEND_CMD_RET(move, MOVE) |
| 34 | APPEND_CMD_RET(move_len, MOVE_LEN) |
| 35 | +APPEND_CMD_RET(moveb, MOVEB) |
| 36 | |
| 37 | static inline void set_jump_tgt_here(u32 * const desc, u32 *jump_cmd) |
| 38 | { |