e1000_nvm.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright(c) 2007 - 2018 Intel Corporation. */
  3. #ifndef _E1000_NVM_H_
  4. #define _E1000_NVM_H_
  5. s32 igb_acquire_nvm(struct e1000_hw *hw);
  6. void igb_release_nvm(struct e1000_hw *hw);
  7. s32 igb_read_mac_addr(struct e1000_hw *hw);
  8. s32 igb_read_part_num(struct e1000_hw *hw, u32 *part_num);
  9. s32 igb_read_part_string(struct e1000_hw *hw, u8 *part_num,
  10. u32 part_num_size);
  11. s32 igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
  12. s32 igb_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
  13. s32 igb_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
  14. s32 igb_validate_nvm_checksum(struct e1000_hw *hw);
  15. s32 igb_update_nvm_checksum(struct e1000_hw *hw);
  16. struct e1000_fw_version {
  17. u32 etrack_id;
  18. u16 eep_major;
  19. u16 eep_minor;
  20. u16 eep_build;
  21. u8 invm_major;
  22. u8 invm_minor;
  23. u8 invm_img_type;
  24. bool or_valid;
  25. u16 or_major;
  26. u16 or_build;
  27. u16 or_patch;
  28. };
  29. void igb_get_fw_version(struct e1000_hw *hw, struct e1000_fw_version *fw_vers);
  30. #endif