aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-31 13:06:26 -0400
committerTom Rini <trini@konsulko.com>2020-08-31 13:06:26 -0400
commit6ade057e37507e7f46c66c9c3264535f49928f2b (patch)
tree66bbb840b4ede37162c01f6020a76b4d424682a5 /board
parent123f4f84f81cd11f1dc3592f15220c49eb650591 (diff)
parentb892b6d1e0afef8d47f256d5b3ca4687bed1bee3 (diff)
downloadu-boot-6ade057e37507e7f46c66c9c3264535f49928f2b.zip
u-boot-6ade057e37507e7f46c66c9c3264535f49928f2b.tar.gz
u-boot-6ade057e37507e7f46c66c9c3264535f49928f2b.tar.bz2
Merge tag 'ti-v2020.10-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
- Update to ABI 3.0 - Fix i2c write in eeprom driver
Diffstat (limited to 'board')
-rw-r--r--board/ti/common/board_detect.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index e09ecda..8b3b4bc 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -113,18 +113,15 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,
/* Corrupted data??? */
if (hdr_read != header) {
- rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4);
/*
* read the eeprom header using i2c again, but use only a
* 1 byte address (some legacy boards need this..)
*/
- if (rc) {
- rc = i2c_set_chip_offset_len(dev, 1);
- if (rc)
- return rc;
+ rc = i2c_set_chip_offset_len(dev, 1);
+ if (rc)
+ return rc;
- rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4);
- }
+ rc = dm_i2c_read(dev, 0, (uint8_t *)&hdr_read, 4);
if (rc)
return rc;
}
@@ -153,16 +150,13 @@ static int __maybe_unused ti_i2c_eeprom_get(int bus_addr, int dev_addr,
/* Corrupted data??? */
if (hdr_read != header) {
- rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read, 4);
/*
* read the eeprom header using i2c again, but use only a
* 1 byte address (some legacy boards need this..)
*/
byte = 1;
- if (rc) {
- rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read,
- 4);
- }
+ rc = i2c_read(dev_addr, 0x0, byte, (uint8_t *)&hdr_read,
+ 4);
if (rc)
return rc;
}