18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Copyright (c) 2019, Intel Corporation. */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef _ICE_NVM_H_ 58c2ecf20Sopenharmony_ci#define _ICE_NVM_H_ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_cienum ice_status 88c2ecf20Sopenharmony_ciice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access); 98c2ecf20Sopenharmony_civoid ice_release_nvm(struct ice_hw *hw); 108c2ecf20Sopenharmony_cienum ice_status 118c2ecf20Sopenharmony_ciice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, 128c2ecf20Sopenharmony_ci bool read_shadow_ram); 138c2ecf20Sopenharmony_cienum ice_status 148c2ecf20Sopenharmony_ciice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, 158c2ecf20Sopenharmony_ci u16 module_type); 168c2ecf20Sopenharmony_cienum ice_status 178c2ecf20Sopenharmony_ciice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size); 188c2ecf20Sopenharmony_cienum ice_status ice_init_nvm(struct ice_hw *hw); 198c2ecf20Sopenharmony_cienum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data); 208c2ecf20Sopenharmony_cienum ice_status 218c2ecf20Sopenharmony_ciice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, 228c2ecf20Sopenharmony_ci u16 length, void *data, bool last_command, u8 command_flags, 238c2ecf20Sopenharmony_ci struct ice_sq_cd *cd); 248c2ecf20Sopenharmony_cienum ice_status 258c2ecf20Sopenharmony_ciice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd); 268c2ecf20Sopenharmony_cienum ice_status ice_nvm_validate_checksum(struct ice_hw *hw); 278c2ecf20Sopenharmony_cienum ice_status ice_nvm_write_activate(struct ice_hw *hw, u8 cmd_flags); 288c2ecf20Sopenharmony_cienum ice_status ice_aq_nvm_update_empr(struct ice_hw *hw); 298c2ecf20Sopenharmony_cienum ice_status 308c2ecf20Sopenharmony_ciice_nvm_set_pkg_data(struct ice_hw *hw, bool del_pkg_data_flag, u8 *data, 318c2ecf20Sopenharmony_ci u16 length, struct ice_sq_cd *cd); 328c2ecf20Sopenharmony_cienum ice_status 338c2ecf20Sopenharmony_ciice_nvm_pass_component_tbl(struct ice_hw *hw, u8 *data, u16 length, 348c2ecf20Sopenharmony_ci u8 transfer_flag, u8 *comp_response, 358c2ecf20Sopenharmony_ci u8 *comp_response_code, struct ice_sq_cd *cd); 368c2ecf20Sopenharmony_ci#endif /* _ICE_NVM_H_ */ 37