net/mlx5: support more tunnel types
[dpdk.git] / drivers / net / ice / base / ice_nvm.h
index 0683565..52e8853 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2020
+ * Copyright(c) 2001-2021 Intel Corporation
  */
 
 #ifndef _ICE_NVM_H_
 #define ICE_NVM_REG_RW_MODULE  0x0
 #define ICE_NVM_REG_RW_FLAGS   0x1
 
+#pragma pack(1)
+struct ice_orom_civd_info {
+       u8 signature[4];        /* Must match ASCII '$CIV' characters */
+       u8 checksum;            /* Simple modulo 256 sum of all structure bytes must equal 0 */
+       __le32 combo_ver;       /* Combo Image Version number */
+       u8 combo_name_len;      /* Length of the unicode combo image version string, max of 32 */
+       __le16 combo_name[32];  /* Unicode string representing the Combo Image version */
+};
+
+#pragma pack()
+
 #define ICE_NVM_ACCESS_MAJOR_VER       0
 #define ICE_NVM_ACCESS_MINOR_VER       5
 
@@ -56,19 +67,6 @@ union ice_nvm_access_data {
        struct ice_nvm_features drv_features; /* NVM features */
 };
 
-/* NVM Access registers */
-#define GL_HIDA(_i)                    (0x00082000 + ((_i) * 4))
-#define GL_HIBA(_i)                    (0x00081000 + ((_i) * 4))
-#define GL_HICR                                0x00082040
-#define GL_HICR_EN                     0x00082044
-#define GLGEN_CSR_DEBUG_C              0x00075750
-#define GLPCI_LBARCTRL                 0x0009DE74
-#define GLNVM_GENS                     0x000B6100
-#define GLNVM_FLA                      0x000B6108
-
-#define ICE_NVM_ACCESS_GL_HIDA_MAX     15
-#define ICE_NVM_ACCESS_GL_HIBA_MAX     1023
-
 u32 ice_nvm_access_get_module(struct ice_nvm_access_cmd *cmd);
 u32 ice_nvm_access_get_flags(struct ice_nvm_access_cmd *cmd);
 u32 ice_nvm_access_get_adapter(struct ice_nvm_access_cmd *cmd);
@@ -85,10 +83,28 @@ enum ice_status
 ice_handle_nvm_access(struct ice_hw *hw, struct ice_nvm_access_cmd *cmd,
                      union ice_nvm_access_data *data);
 enum ice_status
+ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access);
+void ice_release_nvm(struct ice_hw *hw);
+enum ice_status
+ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length,
+               void *data, bool last_command, bool read_shadow_ram,
+               struct ice_sq_cd *cd);
+enum ice_status
 ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
                  bool read_shadow_ram);
+enum ice_status
+ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+                      u16 module_type);
+enum ice_status
+ice_get_inactive_orom_ver(struct ice_hw *hw, struct ice_orom_info *orom);
+enum ice_status
+ice_get_inactive_nvm_ver(struct ice_hw *hw, struct ice_nvm_info *nvm);
+enum ice_status
+ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size);
 enum ice_status ice_init_nvm(struct ice_hw *hw);
 enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data);
 enum ice_status
 ice_read_sr_buf(struct ice_hw *hw, u16 offset, u16 *words, u16 *data);
+enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw);
+enum ice_status ice_nvm_recalculate_checksum(struct ice_hw *hw);
 #endif /* _ICE_NVM_H_ */