net/ice/base: fix bitmap set function
[dpdk.git] / drivers / net / ice / base / ice_type.h
index 9c2fb56..1e1c672 100644 (file)
@@ -511,14 +511,42 @@ struct ice_orom_info {
        u16 build;                      /* Build version of OROM */
 };
 
-/* NVM Information */
+/* NVM version information */
 struct ice_nvm_info {
+       u32 eetrack;
+       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) */
 };
 
@@ -838,7 +866,7 @@ struct ice_hw {
        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 */
 
@@ -1094,6 +1122,12 @@ enum ice_sw_fwd_act_type {
 #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