Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ice/ice_nvm.h
/* SPDX-License-Identifier: BSD-3-Clause */ | /* SPDX-License-Identifier: BSD-3-Clause */ | ||||
/* Copyright (c) 2020, Intel Corporation | /* Copyright (c) 2021, Intel Corporation | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions are met: | * modification, are permitted provided that the following conditions are met: | ||||
* | * | ||||
* 1. Redistributions of source code must retain the above copyright notice, | * 1. Redistributions of source code must retain the above copyright notice, | ||||
* this list of conditions and the following disclaimer. | * this list of conditions and the following disclaimer. | ||||
* | * | ||||
Show All 38 Lines | |||||
/* NVM Read Get Driver Features */ | /* NVM Read Get Driver Features */ | ||||
#define ICE_NVM_GET_FEATURES_MODULE 0xE | #define ICE_NVM_GET_FEATURES_MODULE 0xE | ||||
#define ICE_NVM_GET_FEATURES_FLAGS 0xF | #define ICE_NVM_GET_FEATURES_FLAGS 0xF | ||||
/* NVM Read/Write Mapped Space */ | /* NVM Read/Write Mapped Space */ | ||||
#define ICE_NVM_REG_RW_MODULE 0x0 | #define ICE_NVM_REG_RW_MODULE 0x0 | ||||
#define ICE_NVM_REG_RW_FLAGS 0x1 | #define ICE_NVM_REG_RW_FLAGS 0x1 | ||||
#pragma pack(1) | |||||
struct ice_orom_civd_info { | |||||
u8 signature[4]; /* Must match ASCII '$CIV' characters */ | |||||
u8 checksum; /* Simple modulo 256 sum of all structure bytes must equal 0 */ | |||||
__le32 combo_ver; /* Combo Image Version number */ | |||||
u8 combo_name_len; /* Length of the unicode combo image version string, max of 32 */ | |||||
__le16 combo_name[32]; /* Unicode string representing the Combo Image version */ | |||||
}; | |||||
#pragma pack() | |||||
#define ICE_NVM_ACCESS_MAJOR_VER 0 | #define ICE_NVM_ACCESS_MAJOR_VER 0 | ||||
#define ICE_NVM_ACCESS_MINOR_VER 5 | #define ICE_NVM_ACCESS_MINOR_VER 5 | ||||
/* NVM Access feature flags. Other bits in the features field are reserved and | /* NVM Access feature flags. Other bits in the features field are reserved and | ||||
* should be set to zero when reporting the ice_nvm_features structure. | * should be set to zero when reporting the ice_nvm_features structure. | ||||
*/ | */ | ||||
#define ICE_NVM_FEATURES_0_REG_ACCESS BIT(1) | #define ICE_NVM_FEATURES_0_REG_ACCESS BIT(1) | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, | ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, | ||||
bool read_shadow_ram); | bool read_shadow_ram); | ||||
enum ice_status | enum ice_status | ||||
ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, | ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, | ||||
u16 module_type); | u16 module_type); | ||||
enum ice_status | enum ice_status | ||||
ice_get_nvm_minsrevs(struct ice_hw *hw, struct ice_minsrev_info *minsrevs); | |||||
enum ice_status | |||||
ice_update_nvm_minsrevs(struct ice_hw *hw, struct ice_minsrev_info *minsrevs); | |||||
enum ice_status | |||||
ice_get_inactive_orom_ver(struct ice_hw *hw, struct ice_orom_info *orom); | |||||
enum ice_status | |||||
ice_get_inactive_nvm_ver(struct ice_hw *hw, struct ice_nvm_info *nvm); | |||||
enum ice_status | |||||
ice_get_inactive_netlist_ver(struct ice_hw *hw, struct ice_netlist_info *netlist); | |||||
enum ice_status | |||||
ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size); | ice_read_pba_string(struct ice_hw *hw, u8 *pba_num, u32 pba_num_size); | ||||
enum ice_status ice_init_nvm(struct ice_hw *hw); | enum ice_status ice_init_nvm(struct ice_hw *hw); | ||||
enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data); | enum ice_status ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data); | ||||
enum ice_status ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data); | enum ice_status ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data); | ||||
enum ice_status | enum ice_status | ||||
ice_read_sr_buf(struct ice_hw *hw, u16 offset, u16 *words, u16 *data); | ice_read_sr_buf(struct ice_hw *hw, u16 offset, u16 *words, u16 *data); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd); | ice_aq_erase_nvm(struct ice_hw *hw, u16 module_typeid, struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, | ice_aq_update_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, | ||||
u16 length, void *data, bool last_command, u8 command_flags, | u16 length, void *data, bool last_command, u8 command_flags, | ||||
struct ice_sq_cd *cd); | struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_read_nvm_cfg(struct ice_hw *hw, u8 cmd_flags, u16 field_id, void *data, | ice_aq_read_nvm_cfg(struct ice_hw *hw, u8 cmd_flags, u16 field_id, void *data, | ||||
u16 buf_size, u16 *elem_count, struct ice_sq_cd *cd); | u16 buf_size, u16 *elem_count, struct ice_sq_cd *cd); | ||||
enum ice_status | enum ice_status | ||||
ice_aq_write_nvm_cfg(struct ice_hw *hw, u8 cmd_flags, void *data, u16 buf_size, | ice_aq_write_nvm_cfg(struct ice_hw *hw, u8 cmd_flags, void *data, u16 buf_size, | ||||
u16 elem_count, struct ice_sq_cd *cd); | u16 elem_count, struct ice_sq_cd *cd); | ||||
enum ice_status ice_update_sr_checksum(struct ice_hw *hw); | enum ice_status ice_update_sr_checksum(struct ice_hw *hw); | ||||
enum ice_status ice_validate_sr_checksum(struct ice_hw *hw, u16 *checksum); | enum ice_status ice_validate_sr_checksum(struct ice_hw *hw, u16 *checksum); | ||||
enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw); | enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw); | ||||
enum ice_status ice_nvm_recalculate_checksum(struct ice_hw *hw); | |||||
enum ice_status ice_nvm_write_activate(struct ice_hw *hw, u8 cmd_flags); | |||||
#endif /* _ICE_NVM_H_ */ | #endif /* _ICE_NVM_H_ */ |