net/ice/base: allocate and free RSS global lookup table
[dpdk.git] / drivers / net / ice / base / ice_type.h
index f80e19d..fb350fa 100644 (file)
@@ -509,16 +509,46 @@ struct ice_orom_info {
        u8 major;                       /* Major version of OROM */
        u8 patch;                       /* Patch version of OROM */
        u16 build;                      /* Build version of OROM */
+       u32 srev;                       /* Security revision */
 };
 
-/* NVM Information */
+/* NVM version information */
 struct ice_nvm_info {
+       u32 eetrack;
+       u32 srev;
+       u8 major;
+       u8 minor;
+};
+
+/* Enumeration of possible flash banks for the NVM, OROM, and Netlist modules
+ * of the flash image.
+ */
+enum ice_flash_bank {
+       ICE_INVALID_FLASH_BANK,
+       ICE_1ST_FLASH_BANK,
+       ICE_2ND_FLASH_BANK,
+};
+
+/* information for accessing NVM, OROM, and Netlist flash banks */
+struct ice_bank_info {
+       u32 nvm_ptr;                            /* Pointer to 1st NVM bank */
+       u32 nvm_size;                           /* Size of NVM bank */
+       u32 orom_ptr;                           /* Pointer to 1st OROM bank */
+       u32 orom_size;                          /* Size of OROM bank */
+       u32 netlist_ptr;                        /* Pointer to 1st Netlist bank */
+       u32 netlist_size;                       /* Size of Netlist bank */
+       enum ice_flash_bank nvm_bank;           /* Active NVM bank */
+       enum ice_flash_bank orom_bank;          /* Active OROM bank */
+       enum ice_flash_bank netlist_bank;       /* Active Netlist bank */
+};
+
+/* Flash Chip Information */
+struct ice_flash_info {
        struct ice_orom_info orom;      /* Option ROM version info */
-       u32 eetrack;                    /* NVM data version */
+       struct ice_nvm_info nvm;        /* NVM version information */
+       struct ice_bank_info banks;     /* Flash Bank information */
        u16 sr_words;                   /* Shadow RAM size in words */
        u32 flash_size;                 /* Size of available flash in bytes */
-       u8 major_ver;                   /* major version of dev starter */
-       u8 minor_ver;                   /* minor version of dev starter */
        u8 blank_nvm_mode;              /* is NVM empty (no FW present) */
 };
 
@@ -782,8 +812,6 @@ struct ice_port_info {
        struct ice_lock sched_lock;     /* protect access to TXSched tree */
        struct ice_sched_node *
                sib_head[ICE_MAX_TRAFFIC_CLASS][ICE_AQC_TOPO_MAX_LEVEL_NUM];
-       /* List contain profile ID(s) and other params per layer */
-       struct LIST_HEAD_TYPE rl_prof_list[ICE_AQC_TOPO_MAX_LEVEL_NUM];
        struct ice_bw_type_info root_node_bw_t_info;
        struct ice_bw_type_info tc_node_bw_t_info[ICE_MAX_TRAFFIC_CLASS];
        struct ice_qos_cfg qos_cfg;
@@ -834,11 +862,13 @@ struct ice_hw {
        u8 sw_entry_point_layer;
        u16 max_children[ICE_AQC_TOPO_MAX_LEVEL_NUM];
        struct LIST_HEAD_TYPE agg_list; /* lists all aggregator */
+       /* List contain profile ID(s) and other params per layer */
+       struct LIST_HEAD_TYPE rl_prof_list[ICE_AQC_TOPO_MAX_LEVEL_NUM];
        struct ice_vsi_ctx *vsi_ctx[ICE_MAX_VSI];
        u8 evb_veb;             /* true for VEB, false for VEPA */
        u8 reset_ongoing;       /* true if HW is in reset, false otherwise */
        struct ice_bus_info bus;
-       struct ice_nvm_info nvm;
+       struct ice_flash_info flash;
        struct ice_hw_dev_caps dev_caps;        /* device capabilities */
        struct ice_hw_func_caps func_caps;      /* function capabilities */
 
@@ -1089,11 +1119,24 @@ enum ice_sw_fwd_act_type {
 #define ICE_SR_LINK_DEFAULT_OVERRIDE_PTR       0x134
 #define ICE_SR_POR_REGISTERS_AUTOLOAD_PTR      0x118
 
+/* CSS Header words */
+#define ICE_NVM_CSS_SREV_L                     0x14
+#define ICE_NVM_CSS_SREV_H                     0x15
+
+/* Size in bytes of Option ROM trailer */
+#define ICE_NVM_OROM_TRAILER_LENGTH            660
+
 /* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */
 #define ICE_SR_VPD_SIZE_WORDS          512
 #define ICE_SR_PCIE_ALT_SIZE_WORDS     512
 #define ICE_SR_CTRL_WORD_1_S           0x06
 #define ICE_SR_CTRL_WORD_1_M           (0x03 << ICE_SR_CTRL_WORD_1_S)
+#define ICE_SR_CTRL_WORD_VALID         0x1
+#define ICE_SR_CTRL_WORD_OROM_BANK     BIT(3)
+#define ICE_SR_CTRL_WORD_NETLIST_BANK  BIT(4)
+#define ICE_SR_CTRL_WORD_NVM_BANK      BIT(5)
+
+#define ICE_SR_NVM_PTR_4KB_UNITS       BIT(15)
 
 /* Shadow RAM related */
 #define ICE_SR_SECTOR_SIZE_IN_WORDS    0x800