| /linux/drivers/misc/eeprom/ |
| H A D | eeprom_93cx6.c | 7 * Abstract: EEPROM reader routines for 93cx6 chipsets. 19 MODULE_DESCRIPTION("EEPROM 93cx6 chip driver"); 22 static inline void eeprom_93cx6_pulse_high(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_high() argument 24 eeprom->reg_data_clock = 1; in eeprom_93cx6_pulse_high() 25 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_high() 35 static inline void eeprom_93cx6_pulse_low(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_low() argument 37 eeprom->reg_data_clock = 0; in eeprom_93cx6_pulse_low() 38 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_low() 48 static void eeprom_93cx6_startup(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_startup() argument 53 eeprom->register_read(eeprom); in eeprom_93cx6_startup() [all …]
|
| H A D | idt_89hpesx.c | 12 * This driver primarily is developed to have an access to EEPROM device of 14 * operations from/to EEPROM, which is located at private (so called Master) 17 * /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom 19 * User-space applications won't be able to write to the EEPROM sysfs-node. 65 * @eesize: Size of EEPROM in bytes (calculated from "idt,eecompatible") 66 * @eero: EEPROM Read-only flag 67 * @eeaddr: EEPROM custom address 69 * @inieecmd: Initial cmd value for EEPROM read/write operations 81 * @ee_file: EEPROM read/write sysfs-file 118 * struct idt_eeprom_seq - sequence of data to be read/written from/to EEPROM [all …]
|
| H A D | max6875.c | 7 * Based on eeprom.c 9 * The MAX6875 has a bank of registers and two banks of EEPROM. 12 * * 0x8000 - 0x8046 = configuration EEPROM 13 * * 0x8100 - 0x82FF = user EEPROM 15 * This driver makes the user EEPROM available for read. 17 * The registers & config EEPROM should be accessed via i2c-dev. 23 * address, so this driver is destructive if loaded for the wrong EEPROM chip. 36 /* USER EEPROM is at addresses 0x8100 - 0x82FF */ 76 /* select the eeprom address */ in max6875_update_slice() 126 .name = "eeprom",
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| /linux/drivers/net/wireless/intel/iwlwifi/dvm/ |
| H A D | eeprom.c | 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 [all …]
|
| /linux/drivers/net/ethernet/atheros/atl1e/ |
| H A 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 …]
|
| /linux/Documentation/devicetree/bindings/eeprom/ |
| H A D | microchip,93lc46b.yaml | 4 $id: http://devicetree.org/schemas/eeprom/microchip,93lc46b.yaml# 7 title: Microchip 93xx46 SPI compatible EEPROM family 19 - eeprom-93xx46 28 description: chip select of EEPROM 33 parameter-less property which disables writes to the EEPROM 39 of EEPROM (e.g. for SPI bus multiplexing) 62 eeprom@0 { 63 compatible = "eeprom-93xx46";
|
| /linux/drivers/net/usb/ |
| H A D | asix_common.c | 618 int asix_get_eeprom(struct net_device *net, struct ethtool_eeprom *eeprom, in asix_get_eeprom() argument 626 if (eeprom->len == 0) in asix_get_eeprom() 629 eeprom->magic = AX_EEPROM_MAGIC; in asix_get_eeprom() 631 first_word = eeprom->offset >> 1; in asix_get_eeprom() 632 last_word = (eeprom->offset + eeprom->len - 1) >> 1; in asix_get_eeprom() 639 /* ax8817x returns 2 bytes from eeprom on read */ in asix_get_eeprom() 648 memcpy(data, (u8 *)eeprom_buff + (eeprom->offset & 1), eeprom->len); in asix_get_eeprom() 653 int asix_set_eeprom(struct net_device *net, struct ethtool_eeprom *eeprom, in asix_set_eeprom() argument 662 netdev_dbg(net, "write EEPROM len %d, offset %d, magic 0x%x\n", in asix_set_eeprom() 663 eeprom->len, eeprom->offset, eeprom->magic); in asix_set_eeprom() [all …]
|
| /linux/drivers/w1/slaves/ |
| H A D | Kconfig | 70 tristate "112-byte EEPROM support (DS28E05)" 73 is a 112-byte user-programmable EEPROM is 78 tristate "256b EEPROM family support (DS2430)" 80 Say Y here if you want to use a 1-wire 256bit EEPROM 82 This EEPROM is organized as one page of 32 bytes for random 86 tristate "1kb EEPROM family support (DS2431)" 89 1kb EEPROM family device (DS2431) 92 tristate "4kb EEPROM family support (DS2433)" 95 4kb EEPROM family device (DS2433). 144 tristate "4096-Bit Addressable 1-Wire EEPROM with PIO (DS28E04-100)" [all …]
|
| /linux/Documentation/devicetree/bindings/nvmem/ |
| H A D | nxp,lpc1857-eeprom.yaml | 4 $id: http://devicetree.org/schemas/nvmem/nxp,lpc1857-eeprom.yaml# 7 title: NXP LPC18xx EEPROM memory 14 const: nxp,lpc1857-eeprom 29 - const: eeprom 52 eeprom@4000e000 { 53 compatible = "nxp,lpc1857-eeprom"; 58 clock-names = "eeprom";
|
| /linux/drivers/net/wireless/marvell/libertas/ |
| H A D | ethtool.c | 28 * All 8388 parts have 16KiB EEPROM size at the time of writing. 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()
|
| /linux/Documentation/misc-devices/ |
| H A D | max6875.rst | 21 The Maxim MAX6875 is an EEPROM-programmable power-supply sequencer/supervisor. 23 It also provides 512 bytes of user EEPROM. 25 At reset, the MAX6875 reads the configuration EEPROM into its configuration 45 eeprom - 512 bytes of user-defined EEPROM space. 93 The configuration EEPROM is at addresses 0x8000 - 0x8045. 95 The user EEPROM is at addresses 0x8100 - 0x82ff. 97 Use i2c_smbus_write_word_data() to write a byte to EEPROM. 112 Reading data from the EEPROM is a little more complicated.
|
| /linux/drivers/net/ethernet/wangxun/txgbe/ |
| H A D | txgbe_hw.c | 96 wx_err(wx, "Failed to read EEPROM image\n"); in txgbe_calc_eeprom_checksum() 108 if (i != wx->eeprom.sw_region_offset + TXGBE_EEPROM_CHECKSUM) in txgbe_calc_eeprom_checksum() 120 * txgbe_validate_eeprom_checksum - Validate EEPROM checksum 124 * Performs checksum calculation and validates the EEPROM checksum. If the 133 /* Read the first word from the EEPROM. If this times out or fails, do in txgbe_validate_eeprom_checksum() 135 * EEPROM read fails in txgbe_validate_eeprom_checksum() 139 wx_err(wx, "EEPROM read failed\n"); in txgbe_validate_eeprom_checksum() 148 status = wx_read_ee_hostif(wx, wx->eeprom.sw_region_offset + in txgbe_validate_eeprom_checksum() 153 /* Verify read checksum from EEPROM is the same as in txgbe_validate_eeprom_checksum() 158 wx_err(wx, "Invalid EEPROM checksum\n"); in txgbe_validate_eeprom_checksum()
|
| /linux/arch/arm/boot/dts/aspeed/ |
| H A D | aspeed-bmc-facebook-yosemite4.dts | 614 eeprom@50 { 619 eeprom@51 { 624 eeprom@54 { 641 eeprom@50 { 646 eeprom@51 { 651 eeprom@54 { 668 eeprom@50 { 673 eeprom@51 { 678 eeprom@54 { 695 eeprom@50 { [all …]
|
| /linux/Documentation/w1/slaves/ |
| H A D | w1_ds28e04.rst | 7 * Maxim DS28E04-100 4096-Bit Addressable 1-Wire EEPROM with PIO 20 Support is provided through the sysfs files "eeprom" and "pio". CRC checking 27 A read operation on the "eeprom" file reads the given amount of bytes 28 from the EEPROM of the DS28E04. 30 A write operation on the "eeprom" file writes the given byte sequence 31 to the EEPROM of the DS28E04. If CRC checking mode is enabled only
|
| /linux/Documentation/devicetree/bindings/net/ |
| H A D | via-velocity.txt | 9 - no-eeprom : PCI network cards use an external EEPROM to store data. Embedded 10 devices quite often set this data in uboot and do not provide an eeprom. 11 Specify this option if you have no external eeprom. 19 no-eeprom;
|
| /linux/drivers/comedi/drivers/ |
| H A D | cb_pcidda.c | 33 #define EEPROM_SIZE 128 /* number of entries in eeprom */ 53 /* serial data input for eeprom, caldacs, reference dac */ 63 #define SERIAL_OUT_BIT 0x80 /* serial data out, for reading from eeprom */ 66 #define SELECT_EEPROM_BIT 0x1 /* send serial data in to eeprom */ 147 u16 eeprom_data[EEPROM_SIZE]; /* software copy of board's eeprom */ 150 /* lowlevel read from eeprom */ 167 /* lowlevel write to eeprom/dac */ 184 /* reads a 16 bit value from board's eeprom */ 194 /* bits to send to tell eeprom we want to read */ in cb_pcidda_read_eeprom() 199 /* send serial output stream to eeprom */ in cb_pcidda_read_eeprom() [all …]
|
| H A D | plx9052.h | 33 * CNTRL - User I/O, Direct Slave Response, Serial EEPROM, and 60 #define PLX9052_CNTRL_EEPROM_MASK (0x1f << 24) /* EEPROM bits */ 61 #define PLX9052_CNTRL_EEPROM_CLK BIT(24) /* EEPROM clock */ 62 #define PLX9052_CNTRL_EEPROM_CS BIT(25) /* EEPROM chip select */ 63 #define PLX9052_CNTRL_EEPROM_DOUT BIT(26) /* EEPROM write bit */ 64 #define PLX9052_CNTRL_EEPROM_DIN BIT(27) /* EEPROM read bit */ 65 #define PLX9052_CNTRL_EEPROM_PRESENT BIT(28) /* EEPROM present */
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_ras_eeprom.c | 37 /* These are memory addresses as would be seen by one or more EEPROM 39 * set of EEPROM devices. They form a continuous memory space. 42 * which is a reserved value and indicates that this is an I2C EEPROM 43 * device. It also includes the top 3 bits of the 19 bit EEPROM memory 52 * Depending on the size of the I2C EEPROM device(s), bits 18:16 may 56 * The RAS table lives either at address 0 or address 40000h of EEPROM. 63 * those entities occupy in the EEPROM memory. 77 * EEPROM Table structure v1 80 * | EEPROM TABLE HEADER | 90 /* Assume 2-Mbit size EEPROM and take up the whole space. */ [all …]
|
| /linux/drivers/net/dsa/mv88e6xxx/ |
| H A D | global2.c | 338 /* Offset 0x14: EEPROM Command 339 * Offset 0x15: EEPROM Data (for 16-bit data access) 340 * Offset 0x15: EEPROM Addr (for 8-bit data access) 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() [all …]
|
| /linux/drivers/net/ethernet/dec/tulip/ |
| H A D | eeprom.c | 2 drivers/net/ethernet/dec/tulip/eeprom.c 20 /* Serial EEPROM section. */ 155 unsigned char *ee_data = tp->eeprom; in tulip_parse_eeprom() 159 /* Detect an old-style (SA only) EEPROM layout: in tulip_parse_eeprom() 174 pr_info("%s: Missing EEPROM, this interface may not work correctly!\n", in tulip_parse_eeprom() 187 pr_info("%s: Old format EEPROM on '%s' board. Using substitute media control info\n", in tulip_parse_eeprom() 193 pr_info("%s: Old style EEPROM with no media selection information\n", in tulip_parse_eeprom() 238 pr_info("%s: EEPROM default media type %s\n", in tulip_parse_eeprom() 320 /* Reading a serial EEPROM is a "bit" grungy, but we work our way through:->.*/ 323 #define EE_SHIFT_CLK 0x02 /* EEPROM shift clock. */ [all …]
|