u-boot/board/ti
Matwey V. Kornilov bf6376642f board: ti: common: board_detect: Fix EEPROM read quirk
There are three different kinds of EEPROM possibly present on boards.
  1. 1byte address. For those we should avoid 2byte address in order
     not to rewrite the data. Second byte of the address can potentially
     be interpreted as the data to write.
  2. 2byte address with defined behaviour. When we try to use 1byte
     address they just return "FF FF FF FF ... FF"
  3. 2byte address with undefined behaviour (for instance, 24LC32AI).
     When we try to use 1byte address, then their internal read
     pointer is changed to some value. Subsequential reads may be
     broken.

To gracefully handle both case #1 and case #3 we read all required
data from EEPROM at once (about 80 bytes). So either all the data is
valid or we fallback to 2byte address.

Cc: Nishanth Menon <nm@ti.com>
Fixes: a58147c2db ("board: ti: common: board_detect: Do 1byte address checks first.")
Reference: https://lore.kernel.org/all/CAJs94Ebdd4foOjhGFu9Bop0v=B1US9neDLxfhgcY23ukgLzFOQ@mail.gmail.com/
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Acked-by: Nishanth Menon <nm@ti.com>
2022-08-31 12:16:01 -04:00
..
am43xx Prepare v2021.10-rc4 2021-09-16 10:29:40 -04:00
am57xx WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
am62x board: ti: am62x: Account for DDR size fixups if ECC is enabled 2022-07-06 14:30:08 -04:00
am64x spl: Move SPL_LDSCRIPT defaults to one place 2022-06-28 17:03:31 -04:00
am65x arm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654 2022-07-25 13:02:04 -04:00
am335x board: ti: am335x: Use correct dtbs for SanCloud boards 2022-07-25 13:02:03 -04:00
beagle ARM: omap3_beagle: Power on MMC when setting up PMIC 2022-03-10 13:49:57 -05:00
common board: ti: common: board_detect: Fix EEPROM read quirk 2022-08-31 12:16:01 -04:00
dra7xx doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
evm ARM: omap3: evm: Power on MMC when setting up PMIC 2022-06-10 13:37:32 -04:00
j721e board: ti: j721e: Return if there is an error while configuring SerDes 2022-07-06 14:30:08 -04:00
j721s2 spl: Move SPL_LDSCRIPT defaults to one place 2022-06-28 17:03:31 -04:00
ks2_evm board: ti: k2g: Program PadConfig_202 before locking RSTMUX8 2021-07-29 10:42:22 +05:30
omap5_uevm doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
panda doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
sdp4430 doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
ti816x common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00