New upstream version 18.11-rc1
[deb_dpdk.git] / drivers / crypto / dpaa2_sec / mc / fsl_dpseci_cmd.h
index 26cef0f..af3518a 100644 (file)
@@ -9,22 +9,25 @@
 
 /* DPSECI Version */
 #define DPSECI_VER_MAJOR               5
-#define DPSECI_VER_MINOR               1
+#define DPSECI_VER_MINOR               3
 
 /* Command versioning */
 #define DPSECI_CMD_BASE_VERSION                1
 #define DPSECI_CMD_BASE_VERSION_V2     2
+#define DPSECI_CMD_BASE_VERSION_V3     3
 #define DPSECI_CMD_ID_OFFSET           4
 
 #define DPSECI_CMD_V1(id) \
        ((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION)
 #define DPSECI_CMD_V2(id) \
        ((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION_V2)
+#define DPSECI_CMD_V3(id) \
+       ((id << DPSECI_CMD_ID_OFFSET) | DPSECI_CMD_BASE_VERSION_V3)
 
 /* Command IDs */
 #define DPSECI_CMDID_CLOSE             DPSECI_CMD_V1(0x800)
 #define DPSECI_CMDID_OPEN              DPSECI_CMD_V1(0x809)
-#define DPSECI_CMDID_CREATE            DPSECI_CMD_V2(0x909)
+#define DPSECI_CMDID_CREATE            DPSECI_CMD_V3(0x909)
 #define DPSECI_CMDID_DESTROY           DPSECI_CMD_V1(0x989)
 #define DPSECI_CMDID_GET_API_VERSION   DPSECI_CMD_V1(0xa09)
 
 #define DPSECI_CMDID_SET_RX_QUEUE      DPSECI_CMD_V1(0x194)
 #define DPSECI_CMDID_GET_RX_QUEUE      DPSECI_CMD_V1(0x196)
 #define DPSECI_CMDID_GET_TX_QUEUE      DPSECI_CMD_V1(0x197)
-#define DPSECI_CMDID_GET_SEC_ATTR      DPSECI_CMD_V1(0x198)
+#define DPSECI_CMDID_GET_SEC_ATTR      DPSECI_CMD_V2(0x198)
 #define DPSECI_CMDID_GET_SEC_COUNTERS  DPSECI_CMD_V1(0x199)
-
+#define DPSECI_CMDID_SET_OPR           DPSECI_CMD_V1(0x19A)
+#define DPSECI_CMDID_GET_OPR           DPSECI_CMD_V1(0x19B)
 #define DPSECI_CMDID_SET_CONGESTION_NOTIFICATION       DPSECI_CMD_V1(0x170)
 #define DPSECI_CMDID_GET_CONGESTION_NOTIFICATION       DPSECI_CMD_V1(0x171)
 
@@ -63,6 +67,8 @@ struct dpseci_cmd_create {
        uint8_t num_rx_queues;
        uint8_t pad[6];
        uint32_t options;
+       uint32_t pad2;
+       uint8_t priorities2[8];
 };
 
 struct dpseci_cmd_destroy {
@@ -152,6 +158,8 @@ struct dpseci_rsp_get_sec_attr {
        uint8_t arc4_acc_num;
        uint8_t des_acc_num;
        uint8_t aes_acc_num;
+       uint8_t ccha_acc_num;
+       uint8_t ptha_acc_num;
 };
 
 struct dpseci_rsp_get_sec_counters {
@@ -169,6 +177,63 @@ struct dpseci_rsp_get_api_version {
        uint16_t minor;
 };
 
+struct dpseci_cmd_set_opr {
+       uint16_t pad0;
+       uint8_t index;
+       uint8_t options;
+       uint8_t pad1[7];
+       uint8_t oloe;
+       uint8_t oeane;
+       uint8_t olws;
+       uint8_t oa;
+       uint8_t oprrws;
+};
+
+struct dpseci_cmd_get_opr {
+       uint16_t pad;
+       uint8_t index;
+};
+
+#define DPSECI_RIP_SHIFT       0
+#define DPSECI_RIP_SIZE                1
+#define DPSECI_OPR_ENABLE_SHIFT        1
+#define DPSECI_OPR_ENABLE_SIZE 1
+#define DPSECI_TSEQ_NLIS_SHIFT 0
+#define DPSECI_TSEQ_NLIS_SIZE  1
+#define DPSECI_HSEQ_NLIS_SHIFT 0
+#define DPSECI_HSEQ_NLIS_SIZE  1
+
+struct dpseci_rsp_get_opr {
+       uint64_t pad0;
+       /* from LSB: rip:1 enable:1 */
+       uint8_t flags;
+       uint16_t pad1;
+       uint8_t oloe;
+       uint8_t oeane;
+       uint8_t olws;
+       uint8_t oa;
+       uint8_t oprrws;
+       uint16_t nesn;
+       uint16_t pad8;
+       uint16_t ndsn;
+       uint16_t pad2;
+       uint16_t ea_tseq;
+       /* only the LSB */
+       uint8_t tseq_nlis;
+       uint8_t pad3;
+       uint16_t ea_hseq;
+       /* only the LSB */
+       uint8_t hseq_nlis;
+       uint8_t pad4;
+       uint16_t ea_hptr;
+       uint16_t pad5;
+       uint16_t ea_tptr;
+       uint16_t pad6;
+       uint16_t opr_vid;
+       uint16_t pad7;
+       uint16_t opr_id;
+};
+
 #define DPSECI_DEST_TYPE_SHIFT         0
 #define DPSECI_DEST_TYPE_SIZE          4
 #define DPSECI_CG_UNITS_SHIFT          4