/drivers/misc/eeprom/ |
D | eeprom_93cx6.c | 21 static inline void eeprom_93cx6_pulse_high(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_high() argument 23 eeprom->reg_data_clock = 1; in eeprom_93cx6_pulse_high() 24 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_high() 34 static inline void eeprom_93cx6_pulse_low(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_low() argument 36 eeprom->reg_data_clock = 0; in eeprom_93cx6_pulse_low() 37 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_low() 47 static void eeprom_93cx6_startup(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_startup() argument 52 eeprom->register_read(eeprom); in eeprom_93cx6_startup() 53 eeprom->reg_data_in = 0; in eeprom_93cx6_startup() 54 eeprom->reg_data_out = 0; in eeprom_93cx6_startup() [all …]
|
/drivers/nvmem/ |
D | lpc18xx_eeprom.c | 54 static inline void lpc18xx_eeprom_writel(struct lpc18xx_eeprom_dev *eeprom, in lpc18xx_eeprom_writel() argument 57 writel(val, eeprom->reg_base + reg); in lpc18xx_eeprom_writel() 60 static inline u32 lpc18xx_eeprom_readl(struct lpc18xx_eeprom_dev *eeprom, in lpc18xx_eeprom_readl() argument 63 return readl(eeprom->reg_base + reg); in lpc18xx_eeprom_readl() 66 static int lpc18xx_eeprom_busywait_until_prog(struct lpc18xx_eeprom_dev *eeprom) in lpc18xx_eeprom_busywait_until_prog() argument 75 val = lpc18xx_eeprom_readl(eeprom, LPC18XX_EEPROM_INTSTAT); in lpc18xx_eeprom_busywait_until_prog() 78 lpc18xx_eeprom_writel(eeprom, LPC18XX_EEPROM_INTSTATCLR, in lpc18xx_eeprom_busywait_until_prog() 93 struct lpc18xx_eeprom_dev *eeprom = context; in lpc18xx_eeprom_gather_write() local 101 if ((reg > eeprom->size - LPC18XX_EEPROM_PAGE_SIZE) || in lpc18xx_eeprom_gather_write() 102 (reg + bytes > eeprom->size - LPC18XX_EEPROM_PAGE_SIZE)) in lpc18xx_eeprom_gather_write() [all …]
|
D | rave-sp-eeprom.c | 90 static int rave_sp_eeprom_io(struct rave_sp_eeprom *eeprom, in rave_sp_eeprom_io() argument 97 const unsigned int cmd_size = eeprom->header_size + data_size; in rave_sp_eeprom_io() 107 cmd[offset++] = eeprom->address; in rave_sp_eeprom_io() 117 if (offset < eeprom->header_size) in rave_sp_eeprom_io() 126 ret = rave_sp_exec(eeprom->sp, cmd, cmd_size, page, rsp_size); in rave_sp_eeprom_io() 156 rave_sp_eeprom_page_access(struct rave_sp_eeprom *eeprom, in rave_sp_eeprom_page_access() argument 181 ret = rave_sp_eeprom_io(eeprom, RAVE_SP_EEPROM_READ, in rave_sp_eeprom_page_access() 190 ret = rave_sp_eeprom_io(eeprom, type, page_nr, &page); in rave_sp_eeprom_page_access() 220 static int rave_sp_eeprom_access(struct rave_sp_eeprom *eeprom, in rave_sp_eeprom_access() argument 230 mutex_lock(&eeprom->mutex); in rave_sp_eeprom_access() [all …]
|
/drivers/i2c/ |
D | i2c-slave-eeprom.c | 48 struct eeprom_data *eeprom = i2c_get_clientdata(client); in i2c_slave_eeprom_slave_cb() local 52 if (eeprom->idx_write_cnt < eeprom->num_address_bytes) { in i2c_slave_eeprom_slave_cb() 53 if (eeprom->idx_write_cnt == 0) in i2c_slave_eeprom_slave_cb() 54 eeprom->buffer_idx = 0; in i2c_slave_eeprom_slave_cb() 55 eeprom->buffer_idx = *val | (eeprom->buffer_idx << 8); in i2c_slave_eeprom_slave_cb() 56 eeprom->idx_write_cnt++; in i2c_slave_eeprom_slave_cb() 58 if (!eeprom->read_only) { in i2c_slave_eeprom_slave_cb() 59 spin_lock(&eeprom->buffer_lock); in i2c_slave_eeprom_slave_cb() 60 eeprom->buffer[eeprom->buffer_idx++ & eeprom->address_mask] = *val; in i2c_slave_eeprom_slave_cb() 61 spin_unlock(&eeprom->buffer_lock); in i2c_slave_eeprom_slave_cb() [all …]
|
/drivers/net/wireless/mediatek/mt7601u/ |
D | eeprom.c | 98 mt7601u_has_tssi(struct mt7601u_dev *dev, u8 *eeprom) in mt7601u_has_tssi() argument 100 u16 nic_conf1 = get_unaligned_le16(eeprom + MT_EE_NIC_CONF_1); in mt7601u_has_tssi() 106 mt7601u_set_chip_cap(struct mt7601u_dev *dev, u8 *eeprom) in mt7601u_set_chip_cap() argument 108 u16 nic_conf0 = get_unaligned_le16(eeprom + MT_EE_NIC_CONF_0); in mt7601u_set_chip_cap() 109 u16 nic_conf1 = get_unaligned_le16(eeprom + MT_EE_NIC_CONF_1); in mt7601u_set_chip_cap() 114 dev->ee->tssi_enabled = mt7601u_has_tssi(dev, eeprom) && in mt7601u_set_chip_cap() 131 u8 *eeprom, u8 max_pwr) in mt7601u_set_channel_target_power() argument 133 u8 trgt_pwr = eeprom[MT_EE_TX_TSSI_TARGET_POWER]; in mt7601u_set_channel_target_power() 145 mt7601u_set_channel_power(struct mt7601u_dev *dev, u8 *eeprom) in mt7601u_set_channel_power() argument 153 if (mt7601u_has_tssi(dev, eeprom)) { in mt7601u_set_channel_power() [all …]
|
/drivers/net/wireless/mediatek/mt76/mt7915/ |
D | eeprom.c | 11 u8 *eeprom = mdev->eeprom.data; in mt7915_eeprom_load_precal() local 12 u32 val = eeprom[MT_EE_DO_PRE_CAL]; in mt7915_eeprom_load_precal() 33 u8 *eeprom = dev->mt76.eeprom.data; in mt7915_check_eeprom() local 34 u16 val = get_unaligned_le16(eeprom); in mt7915_check_eeprom() 76 u8 *eeprom = dev->mt76.eeprom.data; in mt7915_eeprom_load_default() local 90 memcpy(eeprom, fw->data, mt7915_eeprom_size(dev)); in mt7915_eeprom_load_default() 138 u8 *eeprom = dev->mt76.eeprom.data; in mt7915_eeprom_parse_band_config() local 141 val = eeprom[MT_EE_WIFI_CONF + phy->band_idx]; in mt7915_eeprom_parse_band_config() 181 u8 path, nss, nss_max = 4, *eeprom = dev->mt76.eeprom.data; in mt7915_eeprom_parse_hw_cap() local 189 eeprom[MT_EE_WIFI_CONF]); in mt7915_eeprom_parse_hw_cap() [all …]
|
/drivers/net/wireless/ralink/rt2x00/ |
D | rt2800pci.c | 79 static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) in rt2800pci_eepromregister_read() argument 81 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2800pci_eepromregister_read() 86 eeprom->reg_data_in = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_IN); in rt2800pci_eepromregister_read() 87 eeprom->reg_data_out = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_OUT); in rt2800pci_eepromregister_read() 88 eeprom->reg_data_clock = in rt2800pci_eepromregister_read() 90 eeprom->reg_chip_select = in rt2800pci_eepromregister_read() 94 static void rt2800pci_eepromregister_write(struct eeprom_93cx6 *eeprom) in rt2800pci_eepromregister_write() argument 96 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2800pci_eepromregister_write() 99 rt2x00_set_field32(®, E2PROM_CSR_DATA_IN, !!eeprom->reg_data_in); in rt2800pci_eepromregister_write() 100 rt2x00_set_field32(®, E2PROM_CSR_DATA_OUT, !!eeprom->reg_data_out); in rt2800pci_eepromregister_write() [all …]
|
D | rt61pci.c | 166 static void rt61pci_eepromregister_read(struct eeprom_93cx6 *eeprom) in rt61pci_eepromregister_read() argument 168 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt61pci_eepromregister_read() 173 eeprom->reg_data_in = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_IN); in rt61pci_eepromregister_read() 174 eeprom->reg_data_out = !!rt2x00_get_field32(reg, E2PROM_CSR_DATA_OUT); in rt61pci_eepromregister_read() 175 eeprom->reg_data_clock = in rt61pci_eepromregister_read() 177 eeprom->reg_chip_select = in rt61pci_eepromregister_read() 181 static void rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom) in rt61pci_eepromregister_write() argument 183 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt61pci_eepromregister_write() 186 rt2x00_set_field32(®, E2PROM_CSR_DATA_IN, !!eeprom->reg_data_in); in rt61pci_eepromregister_write() 187 rt2x00_set_field32(®, E2PROM_CSR_DATA_OUT, !!eeprom->reg_data_out); in rt61pci_eepromregister_write() [all …]
|
D | rt2400pci.c | 128 static void rt2400pci_eepromregister_read(struct eeprom_93cx6 *eeprom) in rt2400pci_eepromregister_read() argument 130 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2400pci_eepromregister_read() 135 eeprom->reg_data_in = !!rt2x00_get_field32(reg, CSR21_EEPROM_DATA_IN); in rt2400pci_eepromregister_read() 136 eeprom->reg_data_out = !!rt2x00_get_field32(reg, CSR21_EEPROM_DATA_OUT); in rt2400pci_eepromregister_read() 137 eeprom->reg_data_clock = in rt2400pci_eepromregister_read() 139 eeprom->reg_chip_select = in rt2400pci_eepromregister_read() 143 static void rt2400pci_eepromregister_write(struct eeprom_93cx6 *eeprom) in rt2400pci_eepromregister_write() argument 145 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2400pci_eepromregister_write() 148 rt2x00_set_field32(®, CSR21_EEPROM_DATA_IN, !!eeprom->reg_data_in); in rt2400pci_eepromregister_write() 149 rt2x00_set_field32(®, CSR21_EEPROM_DATA_OUT, !!eeprom->reg_data_out); in rt2400pci_eepromregister_write() [all …]
|
D | rt2500pci.c | 128 static void rt2500pci_eepromregister_read(struct eeprom_93cx6 *eeprom) in rt2500pci_eepromregister_read() argument 130 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2500pci_eepromregister_read() 135 eeprom->reg_data_in = !!rt2x00_get_field32(reg, CSR21_EEPROM_DATA_IN); in rt2500pci_eepromregister_read() 136 eeprom->reg_data_out = !!rt2x00_get_field32(reg, CSR21_EEPROM_DATA_OUT); in rt2500pci_eepromregister_read() 137 eeprom->reg_data_clock = in rt2500pci_eepromregister_read() 139 eeprom->reg_chip_select = in rt2500pci_eepromregister_read() 143 static void rt2500pci_eepromregister_write(struct eeprom_93cx6 *eeprom) in rt2500pci_eepromregister_write() argument 145 struct rt2x00_dev *rt2x00dev = eeprom->data; in rt2500pci_eepromregister_write() 148 rt2x00_set_field32(®, CSR21_EEPROM_DATA_IN, !!eeprom->reg_data_in); in rt2500pci_eepromregister_write() 149 rt2x00_set_field32(®, CSR21_EEPROM_DATA_OUT, !!eeprom->reg_data_out); in rt2500pci_eepromregister_write() [all …]
|
/drivers/net/wireless/intel/iwlwifi/ |
D | iwl-eeprom-parse.c | 149 static u16 iwl_eeprom_query16(const u8 *eeprom, size_t eeprom_size, int offset) in iwl_eeprom_query16() argument 153 return le16_to_cpup((__le16 *)(eeprom + offset)); in iwl_eeprom_query16() 156 static u32 eeprom_indirect_address(const u8 *eeprom, size_t eeprom_size, in eeprom_indirect_address() argument 166 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address() 170 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address() 174 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address() 178 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address() 182 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address() 186 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address() 190 offset = iwl_eeprom_query16(eeprom, eeprom_size, in eeprom_indirect_address() [all …]
|
/drivers/media/usb/pvrusb2/ |
D | pvrusb2-eeprom.c | 34 u8 *eeprom; in pvr2_eeprom_fetch() local 42 eeprom = kzalloc(EEPROM_SIZE, GFP_KERNEL); in pvr2_eeprom_fetch() 43 if (!eeprom) { in pvr2_eeprom_fetch() 88 msg[1].buf = eeprom+tcnt; in pvr2_eeprom_fetch() 93 kfree(eeprom); in pvr2_eeprom_fetch() 97 return eeprom; in pvr2_eeprom_fetch() 104 u8 *eeprom; in pvr2_eeprom_analyze() local 109 eeprom = pvr2_eeprom_fetch(hdw); in pvr2_eeprom_analyze() 110 if (!eeprom) in pvr2_eeprom_analyze() 113 tveeprom_hauppauge_analog(&tvdata, eeprom); in pvr2_eeprom_analyze() [all …]
|
/drivers/net/wireless/mediatek/mt76/mt7615/ |
D | eeprom.c | 84 u16 val = get_unaligned_le16(dev->eeprom.data); in mt7615_check_eeprom() 99 u8 val, *eeprom = dev->mt76.eeprom.data; in mt7615_eeprom_parse_hw_band_cap() local 121 eeprom[MT_EE_WIFI_CONF]); in mt7615_eeprom_parse_hw_band_cap() 141 u8 *eeprom = dev->mt76.eeprom.data; in mt7615_eeprom_parse_hw_cap() local 149 eeprom[MT7663_EE_HW_CONF1]); in mt7615_eeprom_parse_hw_cap() 158 eeprom[MT_EE_NIC_CONF_0]); in mt7615_eeprom_parse_hw_cap() 272 u8 *eeprom = dev->mt76.eeprom.data; in mt7615_apply_cal_free_data() local 284 eeprom[ical[i]] = otp[ical[i]]; in mt7615_apply_cal_free_data() 287 eeprom[ical_nocheck[i]] = otp[ical_nocheck[i]]; in mt7615_apply_cal_free_data() 295 u8 *eeprom = dev->mt76.eeprom.data; in mt7622_apply_cal_free_data() local [all …]
|
/drivers/net/ethernet/intel/ixgb/ |
D | ixgb_ethtool.c | 350 struct ethtool_eeprom *eeprom, u8 *bytes) in ixgb_get_eeprom() argument 358 if (eeprom->len == 0) { in ixgb_get_eeprom() 363 eeprom->magic = hw->vendor_id | (hw->device_id << 16); in ixgb_get_eeprom() 367 if (eeprom->offset > eeprom->offset + eeprom->len) { in ixgb_get_eeprom() 372 if ((eeprom->offset + eeprom->len) > max_len) in ixgb_get_eeprom() 373 eeprom->len = (max_len - eeprom->offset); in ixgb_get_eeprom() 375 first_word = eeprom->offset >> 1; in ixgb_get_eeprom() 376 last_word = (eeprom->offset + eeprom->len - 1) >> 1; in ixgb_get_eeprom() 388 memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 1), eeprom->len); in ixgb_get_eeprom() 397 struct ethtool_eeprom *eeprom, u8 *bytes) in ixgb_set_eeprom() argument [all …]
|
D | ixgb_ee.c | 355 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_write_eeprom() 448 ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_get_eeprom_data() 455 hw->eeprom[i] = cpu_to_le16(ee_data); in ixgb_get_eeprom_data() 488 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_check_and_get_eeprom_data() 512 return hw->eeprom[index]; in ixgb_get_eeprom_word() 530 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_get_ee_mac_addr() 555 return le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) in ixgb_get_ee_pba_number() 556 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16); in ixgb_get_ee_pba_number() 573 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; in ixgb_get_ee_device_id()
|
/drivers/net/wireless/mediatek/mt76/mt7603/ |
D | eeprom.c | 105 u8 *eeprom = dev->mt76.eeprom.data; in mt7603_apply_cal_free_data() local 121 eeprom[offset] = efuse[offset]; in mt7603_apply_cal_free_data() 139 u16 val = get_unaligned_le16(dev->eeprom.data); in mt7603_check_eeprom() 158 u8 *eeprom; in mt7603_eeprom_init() local 169 memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data, in mt7603_eeprom_init() 173 eeprom = (u8 *)dev->mt76.eeprom.data; in mt7603_eeprom_init() 175 memcpy(dev->mphy.macaddr, eeprom + MT_EE_MAC_ADDR, ETH_ALEN); in mt7603_eeprom_init() 179 if (FIELD_GET(MT_EE_NIC_CONF_0_RX_PATH, eeprom[MT_EE_NIC_CONF_0]) == 1 || in mt7603_eeprom_init() 180 FIELD_GET(MT_EE_NIC_CONF_0_TX_PATH, eeprom[MT_EE_NIC_CONF_0]) == 1 || in mt7603_eeprom_init()
|
/drivers/net/ethernet/atheros/atl1e/ |
D | atl1e_ethtool.c | 205 struct ethtool_eeprom *eeprom, u8 *bytes) in atl1e_get_eeprom() argument 214 if (eeprom->len == 0) in atl1e_get_eeprom() 220 eeprom->magic = hw->vendor_id | (hw->device_id << 16); in atl1e_get_eeprom() 222 first_dword = eeprom->offset >> 2; in atl1e_get_eeprom() 223 last_dword = (eeprom->offset + eeprom->len - 1) >> 2; in atl1e_get_eeprom() 237 memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 3), in atl1e_get_eeprom() 238 eeprom->len); in atl1e_get_eeprom() 245 struct ethtool_eeprom *eeprom, u8 *bytes) in atl1e_set_eeprom() argument 255 if (eeprom->len == 0) in atl1e_set_eeprom() 258 if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) in atl1e_set_eeprom() [all …]
|
/drivers/gpu/drm/panel/ |
D | panel-olimex-lcd-olinuxino.c | 73 struct lcd_olinuxino_eeprom eeprom; member 142 struct lcd_olinuxino_info *lcd_info = &lcd->eeprom.info; in lcd_olinuxino_get_modes() 147 for (i = 0; i < lcd->eeprom.num_modes; i++) { in lcd_olinuxino_get_modes() 149 &lcd->eeprom.reserved[i * sizeof(*lcd_mode)]; in lcd_olinuxino_get_modes() 233 (u8 *)&lcd->eeprom + i); in lcd_olinuxino_probe() 242 checksum = ~crc32(~0, (u8 *)&lcd->eeprom, 252); in lcd_olinuxino_probe() 243 if (checksum != lcd->eeprom.checksum) { in lcd_olinuxino_probe() 249 if (lcd->eeprom.header != LCD_OLINUXINO_HEADER_MAGIC) { in lcd_olinuxino_probe() 255 lcd->eeprom.info.name, in lcd_olinuxino_probe() 256 lcd->eeprom.revision, in lcd_olinuxino_probe() [all …]
|
/drivers/net/wireless/marvell/libertas/ |
D | ethtool.c | 39 struct ethtool_eeprom *eeprom, u8 * bytes) in lbs_ethtool_get_eeprom() argument 45 if (eeprom->offset + eeprom->len > LBS_EEPROM_LEN || in lbs_ethtool_get_eeprom() 46 eeprom->len > LBS_EEPROM_READ_LEN) in lbs_ethtool_get_eeprom() 50 LBS_EEPROM_READ_LEN + eeprom->len); in lbs_ethtool_get_eeprom() 52 cmd.offset = cpu_to_le16(eeprom->offset); in lbs_ethtool_get_eeprom() 53 cmd.len = cpu_to_le16(eeprom->len); in lbs_ethtool_get_eeprom() 56 memcpy(bytes, cmd.value, eeprom->len); in lbs_ethtool_get_eeprom()
|
/drivers/net/ethernet/intel/e1000/ |
D | e1000_hw.c | 3444 struct e1000_eeprom_info *eeprom = &hw->eeprom; in e1000_init_eeprom_params() local 3454 eeprom->type = e1000_eeprom_microwire; in e1000_init_eeprom_params() 3455 eeprom->word_size = 64; in e1000_init_eeprom_params() 3456 eeprom->opcode_bits = 3; in e1000_init_eeprom_params() 3457 eeprom->address_bits = 6; in e1000_init_eeprom_params() 3458 eeprom->delay_usec = 50; in e1000_init_eeprom_params() 3465 eeprom->type = e1000_eeprom_microwire; in e1000_init_eeprom_params() 3466 eeprom->opcode_bits = 3; in e1000_init_eeprom_params() 3467 eeprom->delay_usec = 50; in e1000_init_eeprom_params() 3469 eeprom->word_size = 256; in e1000_init_eeprom_params() [all …]
|
/drivers/net/usb/ |
D | asix_common.c | 635 int asix_get_eeprom(struct net_device *net, struct ethtool_eeprom *eeprom, in asix_get_eeprom() argument 643 if (eeprom->len == 0) in asix_get_eeprom() 646 eeprom->magic = AX_EEPROM_MAGIC; in asix_get_eeprom() 648 first_word = eeprom->offset >> 1; in asix_get_eeprom() 649 last_word = (eeprom->offset + eeprom->len - 1) >> 1; in asix_get_eeprom() 665 memcpy(data, (u8 *)eeprom_buff + (eeprom->offset & 1), eeprom->len); in asix_get_eeprom() 670 int asix_set_eeprom(struct net_device *net, struct ethtool_eeprom *eeprom, in asix_set_eeprom() argument 680 eeprom->len, eeprom->offset, eeprom->magic); in asix_set_eeprom() 682 if (eeprom->len == 0) in asix_set_eeprom() 685 if (eeprom->magic != AX_EEPROM_MAGIC) in asix_set_eeprom() [all …]
|
/drivers/net/ethernet/intel/ixgbe/ |
D | ixgbe_common.c | 506 ret_val = hw->eeprom.ops.read(hw, IXGBE_PBANUM0_PTR, &data); in ixgbe_read_pba_string_generic() 512 ret_val = hw->eeprom.ops.read(hw, IXGBE_PBANUM1_PTR, &pba_ptr); in ixgbe_read_pba_string_generic() 558 ret_val = hw->eeprom.ops.read(hw, pba_ptr, &length); in ixgbe_read_pba_string_generic() 580 ret_val = hw->eeprom.ops.read(hw, pba_ptr + offset, &data); in ixgbe_read_pba_string_generic() 697 hw->eeprom.ops.read(hw, IXGBE_EEPROM_CTRL_4, &ee_ctrl_4); in ixgbe_set_lan_id_multi_port_pcie() 849 struct ixgbe_eeprom_info *eeprom = &hw->eeprom; in ixgbe_init_eeprom_params_generic() local 853 if (eeprom->type == ixgbe_eeprom_uninitialized) { in ixgbe_init_eeprom_params_generic() 854 eeprom->type = ixgbe_eeprom_none; in ixgbe_init_eeprom_params_generic() 857 eeprom->semaphore_delay = 10; in ixgbe_init_eeprom_params_generic() 859 eeprom->word_page_size = 0; in ixgbe_init_eeprom_params_generic() [all …]
|
/drivers/net/wireless/mediatek/mt76/mt76x2/ |
D | eeprom.c | 17 void *src = dev->mt76.eeprom.data + MT_EE_MAC_ADDR; in mt76x2_eeprom_get_macaddr() 81 u8 *eeprom = dev->mt76.eeprom.data; in mt76x2_apply_cal_free_data() local 83 eeprom[MT_EE_TX_POWER_0_START_5G], in mt76x2_apply_cal_free_data() 84 eeprom[MT_EE_TX_POWER_0_START_5G + 1], in mt76x2_apply_cal_free_data() 85 eeprom[MT_EE_TX_POWER_1_START_5G], in mt76x2_apply_cal_free_data() 86 eeprom[MT_EE_TX_POWER_1_START_5G + 1] in mt76x2_apply_cal_free_data() 100 eeprom[offset] = efuse[offset]; in mt76x2_apply_cal_free_data() 105 memcpy(eeprom + MT_EE_TX_POWER_0_START_5G, prev_grp0, 2); in mt76x2_apply_cal_free_data() 108 memcpy(eeprom + MT_EE_TX_POWER_1_START_5G, prev_grp0 + 2, 2); in mt76x2_apply_cal_free_data() 112 eeprom[MT_EE_BT_RCAL_RESULT] = val & 0xff; in mt76x2_apply_cal_free_data() [all …]
|
/drivers/net/wireless/admtek/ |
D | adm8211.c | 74 static void adm8211_eeprom_register_read(struct eeprom_93cx6 *eeprom) in adm8211_eeprom_register_read() argument 76 struct adm8211_priv *priv = eeprom->data; in adm8211_eeprom_register_read() 79 eeprom->reg_data_in = reg & ADM8211_SPR_SDI; in adm8211_eeprom_register_read() 80 eeprom->reg_data_out = reg & ADM8211_SPR_SDO; in adm8211_eeprom_register_read() 81 eeprom->reg_data_clock = reg & ADM8211_SPR_SCLK; in adm8211_eeprom_register_read() 82 eeprom->reg_chip_select = reg & ADM8211_SPR_SCS; in adm8211_eeprom_register_read() 85 static void adm8211_eeprom_register_write(struct eeprom_93cx6 *eeprom) in adm8211_eeprom_register_write() argument 87 struct adm8211_priv *priv = eeprom->data; in adm8211_eeprom_register_write() 90 if (eeprom->reg_data_in) in adm8211_eeprom_register_write() 92 if (eeprom->reg_data_out) in adm8211_eeprom_register_write() [all …]
|
/drivers/net/dsa/mv88e6xxx/ |
D | global2.c | 449 struct ethtool_eeprom *eeprom, u8 *data) in mv88e6xxx_g2_get_eeprom8() argument 451 unsigned int offset = eeprom->offset; in mv88e6xxx_g2_get_eeprom8() 452 unsigned int len = eeprom->len; in mv88e6xxx_g2_get_eeprom8() 455 eeprom->len = 0; in mv88e6xxx_g2_get_eeprom8() 462 eeprom->len++; in mv88e6xxx_g2_get_eeprom8() 472 struct ethtool_eeprom *eeprom, u8 *data) in mv88e6xxx_g2_set_eeprom8() argument 474 unsigned int offset = eeprom->offset; in mv88e6xxx_g2_set_eeprom8() 475 unsigned int len = eeprom->len; in mv88e6xxx_g2_set_eeprom8() 478 eeprom->len = 0; in mv88e6xxx_g2_set_eeprom8() 485 eeprom->len++; in mv88e6xxx_g2_set_eeprom8() [all …]
|