0001
0002
0003
0004 #ifndef _ICE_NVM_H_
0005 #define _ICE_NVM_H_
0006
0007 struct ice_orom_civd_info {
0008 u8 signature[4];
0009 u8 checksum;
0010 __le32 combo_ver;
0011 u8 combo_name_len;
0012 __le16 combo_name[32];
0013 } __packed;
0014
0015 int ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access);
0016 void ice_release_nvm(struct ice_hw *hw);
0017 int
0018 ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
0019 bool read_shadow_ram);
0020 int
0021 ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
0022 u16 module_type);
0023 int ice_get_inactive_orom_ver(struct ice_hw *hw, struct ice_orom_info *orom);
0024 int ice_get_inactive_nvm_ver(struct ice_hw *hw, struct ice_nvm_info *nvm);
0025 int
0026 ice_get_inactive_netlist_ver(struct ice_hw *hw, struct ice_netlist_info *netlist);
0027 int ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size);
0028 int ice_init_nvm(struct ice_hw *hw);
0029 int ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data);
0030 int
0031 ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset,
0032 u16 length, void *data, bool last_command, u8 command_flags,
0033 struct ice_sq_cd *cd);
0034 int
0035 ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd);
0036 int ice_nvm_validate_checksum(struct ice_hw *hw);
0037 int ice_nvm_write_activate(struct ice_hw *hw, u8 cmd_flags, u8 *response_flags);
0038 int ice_aq_nvm_update_empr(struct ice_hw *hw);
0039 int
0040 ice_nvm_set_pkg_data(struct ice_hw *hw, bool del_pkg_data_flag, u8 *data,
0041 u16 length, struct ice_sq_cd *cd);
0042 int
0043 ice_nvm_pass_component_tbl(struct ice_hw *hw, u8 *data, u16 length,
0044 u8 transfer_flag, u8 *comp_response,
0045 u8 *comp_response_code, struct ice_sq_cd *cd);
0046 #endif