Merge remote-tracking branch 'iommu/next'
[deliverable/linux.git] / drivers / crypto / caam / desc_constr.h
index d3869b95e7b1a0d1b89cfb9dd2d125b975e82f9b..a8cd8a78ec1fcdc12ec48886d455ee83ef575f6e 100644 (file)
@@ -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
This page took 0.025049 seconds and 5 git commands to generate.