u-boot-brain/drivers
Eugen Hristev b24dc83f15 misc: i2c_eeprom: implement different probe test eeprom offset
Because of this commit :
5ae84860b0 ("misc: i2c_eeprom: verify that the chip is functional at probe()")
at probe time, each eeprom is tested for read at offset 0.

The Atmel AT24MAC402 eeprom has different mapping. One i2c slave address is
used for the lower 0x80 bytes and another i2c slave address is used for the
upper 0x80 bytes. Because of this basically the i2c master sees 2 different
slaves. We need the upper bytes because we read the unique MAC address from
this EEPROM area.

However this implies that our slave address will return error on reads
from address 0x0 to 0x80.

To solve this, implemented an offset field inside platform data that is by
default 0 (as it is used now), but can be changed in the compatible table.

The probe function will now read at this offset and use it, instead of blindly
checking offset 0.

This will fix the regression noticed on these EEPROMs since the commit
abovementioned that introduces the probe failed issue.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2020-05-28 06:51:06 +02:00
..
adc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ata common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
axi common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bios_emulator common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
block common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
board common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootcount common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cache common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
clk clk: rk3399: Enable/Disable the PCIEPHY clk 2020-05-22 20:53:20 +08:00
core common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
cpu cpu: imx8: use intended cpu-thermal device when getting temp value 2020-05-22 13:27:46 +02:00
crypto drivers: crypto: mod_exp_sw: Re-add DM_FLAG_PRE_RELOC 2020-05-19 14:01:47 -04:00
ddr common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
demo common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dfu common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dma common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fastboot common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
firmware common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
fpga common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
gpio common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
hwspinlock common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
i2c i2c: observe scl_count in i2c_deblock_gpio_loop() 2020-05-28 05:52:46 +02:00
input common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
led common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mailbox common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
memory SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
misc misc: i2c_eeprom: implement different probe test eeprom offset 2020-05-28 06:51:06 +02:00
mmc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mtd mtd: rawnand: denali: deassert write protect pin 2020-05-22 11:21:06 +09:00
net net: ks8851: Add Kconfig entries 2020-05-22 19:46:45 +02:00
nvme common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pch common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci pci: Add Rockchip PCIe PHY controller driver 2020-05-22 20:53:20 +08:00
pci_endpoint common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
phy phy: Fix possible NULL pointer deference 2020-05-25 11:54:53 -04:00
pinctrl common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
power common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pwm common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
qe common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ram common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
remoteproc common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
reset common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rng common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rtc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
scsi common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
serial common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
smem common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
soc common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sound common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spi common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
spmi dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
sysreset common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tee common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
thermal thermal: imx_scu_thermal: prevent boot hang with zero pdata 2020-05-22 13:29:25 +02:00
timer common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
tpm common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
ufs common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
usb eth/r8152: fix typo in register name 2020-05-22 15:22:37 +02:00
video common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
virtio common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
w1 common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
w1-eeprom common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
watchdog common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig dm: rng: Add random number generator(rng) uclass 2020-01-07 18:08:21 +01:00
Makefile drivers: Descend to drivers/soc unconditionally 2020-03-03 13:08:13 +05:30