1031f2147SMd Fahad Iqbal Polash /* SPDX-License-Identifier: GPL-2.0 */ 2031f2147SMd Fahad Iqbal Polash /* Copyright (c) 2019, Intel Corporation. */ 3031f2147SMd Fahad Iqbal Polash 4031f2147SMd Fahad Iqbal Polash #ifndef _ICE_NVM_H_ 5031f2147SMd Fahad Iqbal Polash #define _ICE_NVM_H_ 6031f2147SMd Fahad Iqbal Polash 7e9450990SJacob Keller enum ice_status 884a24798SJesse Brandeburg ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access); 984a24798SJesse Brandeburg void ice_release_nvm(struct ice_hw *hw); 1084a24798SJesse Brandeburg enum ice_status 11e9450990SJacob Keller ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, 12e9450990SJacob Keller bool read_shadow_ram); 13e961b679SJacob Keller enum ice_status 14ea78ce4dSPaul Greenwalt ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, 15ea78ce4dSPaul Greenwalt u16 module_type); 16ea78ce4dSPaul Greenwalt enum ice_status 17e961b679SJacob Keller ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size); 1884a24798SJesse Brandeburg enum ice_status ice_init_nvm(struct ice_hw *hw); 19769c500dSAkeem G Abodunrin enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data); 20544cd2acSCudzilo, Szymon T enum ice_status 21544cd2acSCudzilo, Szymon T ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, 22544cd2acSCudzilo, Szymon T u16 length, void *data, bool last_command, u8 command_flags, 23544cd2acSCudzilo, Szymon T struct ice_sq_cd *cd); 24544cd2acSCudzilo, Szymon T enum ice_status 25544cd2acSCudzilo, Szymon T ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd); 26544cd2acSCudzilo, Szymon T enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw); 27544cd2acSCudzilo, Szymon T enum ice_status ice_nvm_write_activate(struct ice_hw *hw, u8 cmd_flags); 28544cd2acSCudzilo, Szymon T enum ice_status ice_aq_nvm_update_empr(struct ice_hw *hw); 29544cd2acSCudzilo, Szymon T enum ice_status 30544cd2acSCudzilo, Szymon T ice_nvm_set_pkg_data(struct ice_hw *hw, bool del_pkg_data_flag, u8 *data, 31544cd2acSCudzilo, Szymon T u16 length, struct ice_sq_cd *cd); 32544cd2acSCudzilo, Szymon T enum ice_status 33544cd2acSCudzilo, Szymon T ice_nvm_pass_component_tbl(struct ice_hw *hw, u8 *data, u16 length, 34544cd2acSCudzilo, Szymon T u8 transfer_flag, u8 *comp_response, 35544cd2acSCudzilo, Szymon T u8 *comp_response_code, struct ice_sq_cd *cd); 36031f2147SMd Fahad Iqbal Polash #endif /* _ICE_NVM_H_ */ 37