X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=drivers%2Fcrypto%2Fcaam%2Fdesc_constr.h;h=a8cd8a78ec1fcdc12ec48886d455ee83ef575f6e;hb=101105b1717f536ca741f940033996302d4ef191;hp=d3869b95e7b1a0d1b89cfb9dd2d125b975e82f9b;hpb=01b3add8d665428109e901dae2f8df04d255aab1;p=mirror_ubuntu-artful-kernel.git diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h index d3869b95e7b1..a8cd8a78ec1f 100644 --- a/drivers/crypto/caam/desc_constr.h +++ b/drivers/crypto/caam/desc_constr.h @@ -324,6 +324,23 @@ static inline void append_##cmd##_imm_##type(u32 *desc, type immediate, \ } APPEND_CMD_RAW_IMM(load, LOAD, u32); +/* + * ee - endianness + * size - size of immediate type in bytes + */ +#define APPEND_CMD_RAW_IMM2(cmd, op, ee, size) \ +static inline void append_##cmd##_imm_##ee##size(u32 *desc, \ + u##size immediate, \ + u32 options) \ +{ \ + __##ee##size data = cpu_to_##ee##size(immediate); \ + PRINT_POS; \ + append_cmd(desc, CMD_##op | IMMEDIATE | options | sizeof(data)); \ + append_data(desc, &data, sizeof(data)); \ +} + +APPEND_CMD_RAW_IMM2(load, LOAD, be, 32); + /* * Append math command. Only the last part of destination and source need to * be specified