diff options
author | Tom Rini <trini@konsulko.com> | 2022-09-29 16:06:19 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-29 16:06:19 -0400 |
commit | 97c0a9c5708dc60d82cad721a8b882f0ce37e83d (patch) | |
tree | 03b432017b1ee4aa9a76cf17ce0dad329ec18ad8 /board/ti/common/board_detect.c | |
parent | d779fc399ce838160fb842543a53524b04564eda (diff) | |
parent | 76f921eb95d5b814f973a263187db509d6f03903 (diff) |
Merge branch '2022-09-29-assorted-fixes'
- Assorted fixes we want to include before the release.
Diffstat (limited to 'board/ti/common/board_detect.c')
-rw-r--r-- | board/ti/common/board_detect.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c index 9fa7b7beb63..c37629fe8ab 100644 --- a/board/ti/common/board_detect.c +++ b/board/ti/common/board_detect.c @@ -444,6 +444,16 @@ int __maybe_unused ti_i2c_eeprom_am6_get(int bus_addr, int dev_addr, if (rc) return rc; + /* + * Handle case of bad 2 byte eeproms that responds to 1 byte addressing + * but gets stuck in const addressing when read requests are performed + * on offsets. We re-read the board ID to ensure we have sane data back + */ + rc = ti_i2c_eeprom_get(bus_addr, dev_addr, TI_EEPROM_HEADER_MAGIC, + sizeof(board_id), (uint8_t *)&board_id); + if (rc) + return rc; + if (board_id.header.id != TI_AM6_EEPROM_RECORD_BOARD_ID) { pr_err("%s: Invalid board ID record!\n", __func__); return -EINVAL; |