162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* Copyright(c) 2007 - 2018 Intel Corporation. */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef _E1000_NVM_H_ 562306a36Sopenharmony_ci#define _E1000_NVM_H_ 662306a36Sopenharmony_ci 762306a36Sopenharmony_cis32 igb_acquire_nvm(struct e1000_hw *hw); 862306a36Sopenharmony_civoid igb_release_nvm(struct e1000_hw *hw); 962306a36Sopenharmony_cis32 igb_read_mac_addr(struct e1000_hw *hw); 1062306a36Sopenharmony_cis32 igb_read_part_num(struct e1000_hw *hw, u32 *part_num); 1162306a36Sopenharmony_cis32 igb_read_part_string(struct e1000_hw *hw, u8 *part_num, 1262306a36Sopenharmony_ci u32 part_num_size); 1362306a36Sopenharmony_cis32 igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 1462306a36Sopenharmony_cis32 igb_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 1562306a36Sopenharmony_cis32 igb_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 1662306a36Sopenharmony_cis32 igb_validate_nvm_checksum(struct e1000_hw *hw); 1762306a36Sopenharmony_cis32 igb_update_nvm_checksum(struct e1000_hw *hw); 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_cistruct e1000_fw_version { 2062306a36Sopenharmony_ci u32 etrack_id; 2162306a36Sopenharmony_ci u16 eep_major; 2262306a36Sopenharmony_ci u16 eep_minor; 2362306a36Sopenharmony_ci u16 eep_build; 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci u8 invm_major; 2662306a36Sopenharmony_ci u8 invm_minor; 2762306a36Sopenharmony_ci u8 invm_img_type; 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci bool or_valid; 3062306a36Sopenharmony_ci u16 or_major; 3162306a36Sopenharmony_ci u16 or_build; 3262306a36Sopenharmony_ci u16 or_patch; 3362306a36Sopenharmony_ci}; 3462306a36Sopenharmony_civoid igb_get_fw_version(struct e1000_hw *hw, struct e1000_fw_version *fw_vers); 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#endif 37