/openbmc/linux/drivers/misc/eeprom/ |
H A D | eeprom_93cx6.c | 7 * Abstract: EEPROM reader routines for 93cx6 chipsets. 18 MODULE_DESCRIPTION("EEPROM 93cx6 chip driver"); 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() [all …]
|
H A D | Kconfig | 2 menu "EEPROM support" 43 after you configure the board init code to know about each eeprom 50 tristate "Old I2C EEPROM reader (DEPRECATED)" 53 If you say yes here you get read-only access to the EEPROM data 61 will be called eeprom. 67 If you say yes here you get read-only support for the user EEPROM of 68 the Maxim MAX6874/5 EEPROM-programmable, quad power-supply 78 tristate "EEPROM 93CX6 support" 80 This is a driver for the EEPROM chipsets 93c46 and 93c66. 86 tristate "Microwire EEPROM 93XX46 support" [all …]
|
/openbmc/linux/drivers/nvmem/ |
H A D | lpc18xx_eeprom.c | 3 * NXP LPC18xx/LPC43xx EEPROM memory NVMEM driver 38 /* EEPROM device requires a ~1500 kHz clock (min 800 kHz, max 1600 kHz) */ 41 /* EEPROM requires 3 ms of erase/program time between each writing */ 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 71 /* Wait until EEPROM program operation has finished */ in lpc18xx_eeprom_busywait_until_prog() 75 val = lpc18xx_eeprom_readl(eeprom, LPC18XX_EEPROM_INTSTAT); in lpc18xx_eeprom_busywait_until_prog() [all …]
|
H A D | rave-sp-eeprom.c | 4 * EEPROM driver for RAVE SP 18 * enum rave_sp_eeprom_access_type - Supported types of EEPROM access 20 * @RAVE_SP_EEPROM_WRITE: EEPROM write 21 * @RAVE_SP_EEPROM_READ: EEPROM read 29 * enum rave_sp_eeprom_header_size - EEPROM command header sizes 31 * @RAVE_SP_EEPROM_HEADER_SMALL: EEPROM header size for "small" devices (< 8K) 32 * @RAVE_SP_EEPROM_HEADER_BIG: EEPROM header size for "big" devices (> 8K) 43 * struct rave_sp_eeprom_page - RAVE SP EEPROM page 59 * struct rave_sp_eeprom - RAVE SP EEPROM device 62 * @mutex: Lock protecting access to EEPROM [all …]
|
/openbmc/u-boot/board/corscience/tricorder/ |
H A D | tricorder-eeprom.c | 10 #include "tricorder-eeprom.h" 15 printf("Expected EEPROM %s %08x, got %08x\n", msg, a, b); in warn_wrong_value() 18 static int handle_eeprom_v0(struct tricorder_eeprom *eeprom) in handle_eeprom_v0() argument 31 printf("Old EEPROM (v0), consider rewrite!\n"); in handle_eeprom_v0() 33 if (be16_to_cpu(eeprom->length) != sizeof(eepromv0)) { in handle_eeprom_v0() 35 be16_to_cpu(eeprom->length)); in handle_eeprom_v0() 39 memcpy(&eepromv0, eeprom, sizeof(eepromv0)); in handle_eeprom_v0() 50 memset(eeprom->interface_version, 0x0, in handle_eeprom_v0() 52 crc = crc32(0L, (unsigned char *)eeprom, TRICORDER_EEPROM_CRC_SIZE); in handle_eeprom_v0() 53 eeprom->crc32 = cpu_to_be32(crc); in handle_eeprom_v0() [all …]
|
H A D | tricorder.c | 21 #include "tricorder-eeprom.h" 39 * get_eeprom - read the eeprom 41 * @eeprom - pointer to a eeprom struct to fill 43 * This function will panic() on wrong EEPROM content 45 static void get_eeprom(struct tricorder_eeprom *eeprom) in get_eeprom() argument 49 if (!eeprom) in get_eeprom() 50 panic("No eeprom given!\n"); in get_eeprom() 67 /* BMS is _not_ set, do the EEPROM check */ in get_eeprom() 68 ret = tricorder_get_eeprom(0x51, eeprom); in get_eeprom() 70 if (strncmp(eeprom->board_name, "CS10411", 7) != 0) in get_eeprom() [all …]
|
/openbmc/qemu/hw/nvram/ |
H A D | eeprom93xx.c | 2 * QEMU EEPROM 93xx emulation 28 * eeprom93xx_new - add a new EEPROM (with 16, 64 or 256 words) 29 * eeprom93xx_free - destroy EEPROM 30 * eeprom93xx_read - read data from the EEPROM 31 * eeprom93xx_write - write data to the EEPROM 32 * eeprom93xx_data - get EEPROM data array for external manipulation 35 * - No emulation of EEPROM timings. 43 /* Debug EEPROM emulation. */ 47 #define logout(fmt, ...) fprintf(stderr, "EEPROM\t%-24s" fmt, __func__, ## __VA_ARGS__) 92 /* Code for saving and restoring of EEPROM state. */ [all …]
|
/openbmc/linux/drivers/i2c/ |
H A D | i2c-slave-eeprom.c | 3 * I2C slave mode EEPROM simulator 9 * this driver does not support simulating EEPROM types which take more than 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() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt7601u/ |
H A D | eeprom.c | 13 #include "eeprom.h" 51 /* Parts of eeprom not in the usage map (0x80-0xc0,0xf0) in mt7601u_efuse_read() 90 …dev_err(dev->dev, "Error: your device needs default EEPROM file and this driver doesn't support it… in mt7601u_efuse_physical_size_check() 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 [all …]
|
/openbmc/linux/drivers/media/usb/pvrusb2/ |
H A D | pvrusb2-eeprom.c | 9 #include "pvrusb2-eeprom.h" 19 Read and analyze data in the eeprom. Use tveeprom to figure out 27 /* We seem to only be interested in the last 128 bytes of the EEPROM */ 30 /* Grab EEPROM contents, needed for direct method. */ 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() 45 "Failed to allocate memory required to read eeprom"); in pvr2_eeprom_fetch() 49 trace_eeprom("Value for eeprom addr from controller was 0x%x", in pvr2_eeprom_fetch() 52 /* Seems that if the high bit is set, then the *real* eeprom in pvr2_eeprom_fetch() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7996/ |
H A D | eeprom.c | 8 #include "eeprom.h" 12 u8 *eeprom = dev->mt76.eeprom.data; in mt7996_check_eeprom() local 13 u16 val = get_unaligned_le16(eeprom); in mt7996_check_eeprom() 32 u8 *eeprom = dev->mt76.eeprom.data; in mt7996_eeprom_load_default() local 46 memcpy(eeprom, fw->data, MT7996_EEPROM_SIZE); in mt7996_eeprom_load_default() 78 /* read eeprom data from efuse */ in mt7996_eeprom_load() 114 u8 *eeprom = phy->dev->mt76.eeprom.data; in mt7996_eeprom_parse_band_config() local 115 u32 val = eeprom[MT_EE_WIFI_CONF]; in mt7996_eeprom_parse_band_config() 123 val = eeprom[MT_EE_WIFI_CONF + 1]; in mt7996_eeprom_parse_band_config() 152 u8 *eeprom = dev->mt76.eeprom.data; in mt7996_eeprom_parse_hw_cap() local [all …]
|
/openbmc/linux/include/linux/ |
H A D | eeprom_93cx6.h | 10 Abstract: EEPROM reader datastructures for 93cx6 chipsets. 17 * EEPROM operation defines. 32 * for reading the eeprom data. 34 * @register_read(struct eeprom_93cx6 *eeprom): handler to 35 * read the eeprom register, this function should set all reg_* fields. 36 * @register_write(struct eeprom_93cx6 *eeprom): handler to 37 * write to the eeprom register by using all reg_* fields. 38 * @width: eeprom width, should be one of the PCI_EEPROM_WIDTH_* defines 39 * @quirks: eeprom or controller quirks 47 * and the eeprom_93cx6 handlers for reading the eeprom. [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7915/ |
H A D | eeprom.c | 6 #include "eeprom.h" 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() 84 u8 *eeprom = dev->mt76.eeprom.data; in mt7915_eeprom_load_default() local 98 memcpy(eeprom, fw->data, mt7915_eeprom_size(dev)); in mt7915_eeprom_load_default() 131 /* read eeprom data from efuse */ in mt7915_eeprom_load() 146 u8 *eeprom = dev->mt76.eeprom.data; in mt7915_eeprom_parse_band_config() local 150 val = eeprom[MT_EE_WIFI_CONF + band]; in mt7915_eeprom_parse_band_config() [all …]
|
/openbmc/u-boot/board/ti/common/ |
H A D | board_detect.h | 3 * Library to support early TI EVM EEPROM handling 11 /* TI EEPROM MAGIC Header identifier */ 30 * @mac_addr: Any MAC addresses written in the EEPROM 32 * The data is this structure is read from the EEPROM on the board. 46 /* DRA7 EEPROM MAGIC Header identifier */ 62 * The data is this structure is read from the EEPROM on the board. 78 * struct ti_common_eeprom - Null terminated, usable EEPROM contents. 103 * ti_i2c_eeprom_am_get() - Consolidated eeprom data collection for AM* TI EVMs 113 * ti_i2c_eeprom_dra7_get() - Consolidated eeprom data for DRA7 TI EVMs 121 * @name_tag: Tag used in eeprom for the board [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/e1000e/ |
H A D | nvm.c | 7 * e1000_raise_eec_clk - Raise EEPROM clock 9 * @eecd: pointer to the EEPROM 11 * Enable/Raise the EEPROM clock bit. 22 * e1000_lower_eec_clk - Lower EEPROM clock 24 * @eecd: pointer to the EEPROM 26 * Clear/Lower the EEPROM clock bit. 37 * e1000_shift_out_eec_bits - Shift data bits our to the EEPROM 39 * @data: data to send to the EEPROM 42 * We need to shift 'count' bits out to the EEPROM. So, the value in the 43 * "data" parameter will be shifted out to the EEPROM one bit at a time. [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/nvmem/ |
H A D | lpc1857-eeprom.txt | 1 * NXP LPC18xx EEPROM memory NVMEM driver 4 - compatible: Should be "nxp,lpc1857-eeprom" 8 - reg: EEPROM registers. 9 - mem: EEPROM address space. 12 - eeprom: EEPROM operating clock. 14 the EEPROM in reset. 15 - interrupts: Should contain EEPROM interrupt. 19 eeprom: eeprom@4000e000 { 20 compatible = "nxp,lpc1857-eeprom"; 25 clock-names = "eeprom";
|
H A D | zii,rave-sp-eeprom.txt | 1 Zodiac Inflight Innovations RAVE EEPROM Bindings 3 RAVE SP EEPROM device is a "MFD cell" device exposing physical EEPROM 11 - compatible: Should be "zii,rave-sp-eeprom" 15 - zii,eeprom-name: Unique EEPROM identifier describing its function in the 29 eeprom@a4 { 30 compatible = "zii,rave-sp-eeprom"; 34 zii,eeprom-name = "main-eeprom";
|
/openbmc/linux/drivers/net/ethernet/intel/igc/ |
H A D | igc_nvm.c | 8 * igc_poll_eerd_eewr_done - Poll for EEPROM read/write completion 10 * @ee_reg: EEPROM flag for polling 12 * Polls the EEPROM status bit for either read or write completion based 39 * igc_acquire_nvm - Generic request for access to EEPROM 42 * Set the EEPROM access request bit and wait for EEPROM access grant bit. 44 * EEPROM access and return -IGC_ERR_NVM (-1). 74 * igc_release_nvm - Release exclusive access to EEPROM 77 * Stop any current commands to the EEPROM and clear the EEPROM request bit. 89 * igc_read_nvm_eerd - Reads EEPROM using EERD register 91 * @offset: offset of word in the EEPROM to read [all …]
|
/openbmc/openbmc/meta-ampere/meta-mitchell/recipes-ampere/platform/ampere-utils/ |
H A D | ampere_firmware_upgrade.sh | 3 # Helper script to flash FRU and Boot EEPROM devices. 9 # Syntax for EEPROM: 10 # ampere_firmware_upgrade.sh eeprom <image> [<dev>] 11 # dev: 1 for main Boot EEPROM (default), 2 for secondary Boot EEPROM (if supported) 51 # Switch EEPROM control to BMC AST2600 I2C 57 echo "Run update Primary EEPROM" 60 echo "Run update Failover EEPROM" 63 echo "Please choose Primary EEPROM (1) or Failover EEPROM (2)" 67 # The EEPROM (AT24C64WI) with address 0x50 at BMC_I2C11 bus 68 # Write Firmware to EEPROM and read back for validation [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | e1000_nvm.c | 11 * igb_raise_eec_clk - Raise EEPROM clock 13 * @eecd: pointer to the EEPROM 15 * Enable/Raise the EEPROM clock bit. 26 * igb_lower_eec_clk - Lower EEPROM clock 28 * @eecd: pointer to the EEPROM 30 * Clear/Lower the EEPROM clock bit. 41 * igb_shift_out_eec_bits - Shift data bits our to the EEPROM 43 * @data: data to send to the EEPROM 46 * We need to shift 'count' bits out to the EEPROM. So, the value in the 47 * "data" parameter will be shifted out to the EEPROM one bit at a time. [all …]
|
/openbmc/linux/drivers/staging/vt6655/ |
H A D | srom.c | 6 * Purpose:Implement functions to access eeprom 13 * SROMbyReadEmbedded - Embedded read eeprom via MAC 14 * SROMbWriteEmbedded - Embedded write eeprom via MAC 15 * SROMvRegBitsOn - Set Bits On in eeprom 16 * SROMvRegBitsOff - Clear Bits Off in eeprom 17 * SROMbIsRegBitsOn - Test if Bits On in eeprom 18 * SROMbIsRegBitsOff - Test if Bits Off in eeprom 19 * SROMvReadAllContents - Read all contents in eeprom 20 * SROMvWriteAllContents - Write all contents in eeprom 21 * SROMvReadEtherAddress - Read Ethernet Address in eeprom [all …]
|
/openbmc/qemu/hw/i2c/ |
H A D | smbus_eeprom.c | 2 * QEMU SMBus EEPROM device 38 #define TYPE_SMBUS_EEPROM "smbus-eeprom" 54 SMBusEEPROMDevice *eeprom = SMBUS_EEPROM(dev); in eeprom_receive_byte() local 55 uint8_t *data = eeprom->data; in eeprom_receive_byte() 56 uint8_t val = data[eeprom->offset++]; in eeprom_receive_byte() 58 eeprom->accessed = true; in eeprom_receive_byte() 68 SMBusEEPROMDevice *eeprom = SMBUS_EEPROM(dev); in eeprom_write_data() local 69 uint8_t *data = eeprom->data; in eeprom_write_data() 71 eeprom->accessed = true; in eeprom_write_data() 77 eeprom->offset = buf[0]; in eeprom_write_data() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe_x540.c | 181 * ixgbe_init_eeprom_params_X540 - Initialize EEPROM params 184 * Initializes the EEPROM parameters ixgbe_eeprom_info within the 185 * ixgbe_hw struct in order to set up EEPROM access. 189 struct ixgbe_eeprom_info *eeprom = &hw->eeprom; in ixgbe_init_eeprom_params_X540() local 191 if (eeprom->type == ixgbe_eeprom_uninitialized) { in ixgbe_init_eeprom_params_X540() 195 eeprom->semaphore_delay = 10; in ixgbe_init_eeprom_params_X540() 196 eeprom->type = ixgbe_flash; in ixgbe_init_eeprom_params_X540() 200 eeprom->word_size = BIT(eeprom_size + in ixgbe_init_eeprom_params_X540() 203 hw_dbg(hw, "Eeprom params: type = %d, size = %d\n", in ixgbe_init_eeprom_params_X540() 204 eeprom->type, eeprom->word_size); in ixgbe_init_eeprom_params_X540() [all …]
|
/openbmc/u-boot/drivers/net/ |
H A D | e1000_spi.c | 91 if (hw->eeprom.type != e1000_eeprom_spi) { in spi_setup_slave() 92 E1000_ERR(hw, "No attached SPI EEPROM found!\n"); in spi_setup_slave() 107 E1000_DBG(hw->nic, "EEPROM SPI access requested\n"); in spi_setup_slave() 114 E1000_DBG(hw->nic, "EEPROM SPI access released\n"); in spi_free_slave() 122 E1000_ERR(hw, "EEPROM SPI cannot be acquired!\n"); in spi_claim_bus() 157 /* The EEPROM opcodes */ 165 /* The EEPROM status bits */ 178 * of the EEPROM commands at this time. 210 (off >> (hw->eeprom.address_bits - 8)) & 0xff, off & 0xff in e1000_spi_eeprom_write_page() 215 if (e1000_spi_xfer(hw, 8 + hw->eeprom.address_bits, op, NULL, intr)) in e1000_spi_eeprom_write_page() [all …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/ |
H A D | iwl-eeprom-parse.c | 11 #include "iwl-eeprom-parse.h" 14 /* EEPROM offset definitions */ 29 /* corresponding link offsets in EEPROM */ 65 /* SKU Capabilities (actual values from EEPROM definition) */ 74 /* radio config bits (actual values from EEPROM definition) */ 84 * EEPROM bands 86 * that they are stored in the EEPROM band information. Note 87 * that EEPROM bands aren't the same as mac80211 bands, and 88 * there are even special "ht40 bands" in the EEPROM. 147 /* EEPROM reading functions */ [all …]
|