Lines Matching full:eeprom
16 /* EEPROM offset definitions */
31 /* corresponding link offsets in EEPROM */
67 /* SKU Capabilities (actual values from EEPROM definition) */
76 /* radio config bits (actual values from EEPROM definition) */
85 * EEPROM bands
87 * that they are stored in the EEPROM band information. Note
88 * that EEPROM bands aren't the same as mac80211 bands, and
89 * there are even special "ht40 bands" in the EEPROM.
148 /* EEPROM reading functions */
150 static u16 iwl_eeprom_query16(const u8 *eeprom, size_t eeprom_size, int offset) in iwl_eeprom_query16() argument
154 return le16_to_cpup((__le16 *)(eeprom + offset)); in iwl_eeprom_query16()
157 static u32 eeprom_indirect_address(const u8 *eeprom, size_t eeprom_size, in eeprom_indirect_address() argument
167 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
171 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
175 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
179 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
183 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
187 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
191 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
195 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address()
207 static const u8 *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_query_addr() argument
210 u32 address = eeprom_indirect_address(eeprom, eeprom_size, offset); in iwl_eeprom_query_addr()
215 return &eeprom[address]; in iwl_eeprom_query_addr()
218 static int iwl_eeprom_read_calib(const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_read_calib() argument
223 hdr = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_read_calib()
234 * enum iwl_eeprom_channel_flags - channel flags in EEPROM
252 * struct iwl_eeprom_channel - EEPROM channel data
284 * in an EEPROM image.
360 const u8 *eeprom, size_t eeprom_size, in iwl_eeprom_enhanced_txpower() argument
371 txp_len = (__le16 *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
375 txp_array = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_eeprom_enhanced_txpower()
420 const u8 *eeprom, size_t eeprom_size, in iwl_init_band_reference() argument
429 *ch_info = (void *)iwl_eeprom_query_addr(eeprom, eeprom_size, offset); in iwl_init_band_reference()
515 const u8 *eeprom, size_t eeprom_size) in iwl_init_channel_map() argument
524 * Loop through the 5 EEPROM bands and add them to the parse list in iwl_init_channel_map()
529 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
596 * EEPROM contain enhanced tx power information in iwl_init_channel_map()
600 iwl_eeprom_enhanced_txpower(dev, data, eeprom, eeprom_size, in iwl_init_channel_map()
621 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ in iwl_init_channel_map()
625 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, in iwl_init_channel_map()
629 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ in iwl_init_channel_map()
652 * EEPROM access time values:
654 * Driver initiates EEPROM read by writing byte address << 1 to CSR_EEPROM_REG.
662 * The device's EEPROM semaphore prevents conflicts between driver and uCode
663 * when accessing the EEPROM; each access is a series of pulses to/from the
664 * EEPROM chip, not a single event, so even reads could conflict if they
707 IWL_DEBUG_EEPROM(trans->dev, "EEPROM signature=0x%08x\n", gp); in iwl_eeprom_verify_signature()
712 IWL_ERR(trans, "EEPROM with bad signature: 0x%08x\n", in iwl_eeprom_verify_signature()
727 "bad EEPROM/OTP signature, type=%s, EEPROM_GP=0x%08x\n", in iwl_eeprom_verify_signature()
728 nvm_is_otp ? "OTP" : "EEPROM", gp); in iwl_eeprom_verify_signature()
858 * iwl_find_otp_image: find EEPROM image in OTP
859 * finding the OTP block that contains the EEPROM image.
916 * iwl_read_eeprom - read EEPROM contents
918 * Load the EEPROM contents from adapter and return it
923 int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size) in iwl_read_eeprom() argument
934 if (!eeprom || !eeprom_size) in iwl_read_eeprom()
950 IWL_ERR(trans, "EEPROM not found, EEPROM_GP=0x%08x\n", gp); in iwl_read_eeprom()
954 /* Make sure driver (instead of uCode) is allowed to read EEPROM */ in iwl_read_eeprom()
957 IWL_ERR(trans, "Failed to acquire EEPROM semaphore.\n"); in iwl_read_eeprom()
992 /* eeprom is an array of 16bit values */ in iwl_read_eeprom()
1005 "Time out reading EEPROM[%d]\n", addr); in iwl_read_eeprom()
1014 nvm_is_otp ? "OTP" : "EEPROM"); in iwl_read_eeprom()
1019 *eeprom = (u8 *)e; in iwl_read_eeprom()
1032 const u8 *eeprom, size_t eeprom_size) in iwl_init_sbands() argument
1036 eeprom, eeprom_size); in iwl_init_sbands()
1059 IWL_ERR_DEV(dev, "EEPROM: used only %d of %d channels\n", in iwl_init_sbands()
1063 /* EEPROM data functions */
1066 const u8 *eeprom, size_t eeprom_size) in iwl_parse_eeprom_data() argument
1082 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_MAC_ADDRESS); in iwl_parse_eeprom_data()
1086 data->n_hw_addrs = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
1089 if (iwl_eeprom_read_calib(eeprom, eeprom_size, data)) in iwl_parse_eeprom_data()
1092 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, EEPROM_XTAL); in iwl_parse_eeprom_data()
1097 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
1103 tmp = iwl_eeprom_query_addr(eeprom, eeprom_size, in iwl_parse_eeprom_data()
1111 iwl_eeprom_query16(eeprom, eeprom_size, EEPROM_RADIO_CONFIG); in iwl_parse_eeprom_data()
1119 sku = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
1129 data->nvm_version = iwl_eeprom_query16(eeprom, eeprom_size, in iwl_parse_eeprom_data()
1132 /* check overrides (some devices have wrong EEPROM) */ in iwl_parse_eeprom_data()
1144 iwl_init_sbands(trans, cfg, data, eeprom, eeprom_size); in iwl_parse_eeprom_data()