xref: /OK3568_Linux_fs/kernel/drivers/net/ethernet/intel/ice/ice_nvm.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /* Copyright (c) 2019, Intel Corporation. */
3*4882a593Smuzhiyun 
4*4882a593Smuzhiyun #ifndef _ICE_NVM_H_
5*4882a593Smuzhiyun #define _ICE_NVM_H_
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun enum ice_status
8*4882a593Smuzhiyun ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access);
9*4882a593Smuzhiyun void ice_release_nvm(struct ice_hw *hw);
10*4882a593Smuzhiyun enum ice_status
11*4882a593Smuzhiyun ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
12*4882a593Smuzhiyun 		  bool read_shadow_ram);
13*4882a593Smuzhiyun enum ice_status
14*4882a593Smuzhiyun ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
15*4882a593Smuzhiyun 		       u16 module_type);
16*4882a593Smuzhiyun enum ice_status
17*4882a593Smuzhiyun ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size);
18*4882a593Smuzhiyun enum ice_status ice_init_nvm(struct ice_hw *hw);
19*4882a593Smuzhiyun enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data);
20*4882a593Smuzhiyun enum ice_status
21*4882a593Smuzhiyun ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset,
22*4882a593Smuzhiyun 		  u16 length, void *data, bool last_command, u8 command_flags,
23*4882a593Smuzhiyun 		  struct ice_sq_cd *cd);
24*4882a593Smuzhiyun enum ice_status
25*4882a593Smuzhiyun ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd);
26*4882a593Smuzhiyun enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw);
27*4882a593Smuzhiyun enum ice_status ice_nvm_write_activate(struct ice_hw *hw, u8 cmd_flags);
28*4882a593Smuzhiyun enum ice_status ice_aq_nvm_update_empr(struct ice_hw *hw);
29*4882a593Smuzhiyun enum ice_status
30*4882a593Smuzhiyun ice_nvm_set_pkg_data(struct ice_hw *hw, bool del_pkg_data_flag, u8 *data,
31*4882a593Smuzhiyun 		     u16 length, struct ice_sq_cd *cd);
32*4882a593Smuzhiyun enum ice_status
33*4882a593Smuzhiyun ice_nvm_pass_component_tbl(struct ice_hw *hw, u8 *data, u16 length,
34*4882a593Smuzhiyun 			   u8 transfer_flag, u8 *comp_response,
35*4882a593Smuzhiyun 			   u8 *comp_response_code, struct ice_sq_cd *cd);
36*4882a593Smuzhiyun #endif /* _ICE_NVM_H_ */
37