18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Copyright(c) 2007 - 2018 Intel Corporation. */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef _E1000_NVM_H_ 58c2ecf20Sopenharmony_ci#define _E1000_NVM_H_ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_cis32 igb_acquire_nvm(struct e1000_hw *hw); 88c2ecf20Sopenharmony_civoid igb_release_nvm(struct e1000_hw *hw); 98c2ecf20Sopenharmony_cis32 igb_read_mac_addr(struct e1000_hw *hw); 108c2ecf20Sopenharmony_cis32 igb_read_part_num(struct e1000_hw *hw, u32 *part_num); 118c2ecf20Sopenharmony_cis32 igb_read_part_string(struct e1000_hw *hw, u8 *part_num, 128c2ecf20Sopenharmony_ci u32 part_num_size); 138c2ecf20Sopenharmony_cis32 igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 148c2ecf20Sopenharmony_cis32 igb_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 158c2ecf20Sopenharmony_cis32 igb_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 168c2ecf20Sopenharmony_cis32 igb_validate_nvm_checksum(struct e1000_hw *hw); 178c2ecf20Sopenharmony_cis32 igb_update_nvm_checksum(struct e1000_hw *hw); 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistruct e1000_fw_version { 208c2ecf20Sopenharmony_ci u32 etrack_id; 218c2ecf20Sopenharmony_ci u16 eep_major; 228c2ecf20Sopenharmony_ci u16 eep_minor; 238c2ecf20Sopenharmony_ci u16 eep_build; 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci u8 invm_major; 268c2ecf20Sopenharmony_ci u8 invm_minor; 278c2ecf20Sopenharmony_ci u8 invm_img_type; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci bool or_valid; 308c2ecf20Sopenharmony_ci u16 or_major; 318c2ecf20Sopenharmony_ci u16 or_build; 328c2ecf20Sopenharmony_ci u16 or_patch; 338c2ecf20Sopenharmony_ci}; 348c2ecf20Sopenharmony_civoid igb_get_fw_version(struct e1000_hw *hw, struct e1000_fw_version *fw_vers); 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#endif 37