Skip to contentSkip to conversation

board/freescale/common: fix a bug that failed to read/write eeprom on ls1021atsn

PATCH New Biwen Li 3 participants 3 messages Oct 26, 2020 – Dec 11, 2020

lore
Share & tools
lore

Biwen Li

author
#0 lore raw

PATCH 1/1 board/freescale/common: fix a bug that failed to read/write eeprom on ls1021atsn

From: Biwen Li <[email protected]>

Fix a bug that failed to read/write eeprom on ls1021atsn

---
 board/freescale/common/sys_eeprom.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
board/freescale/common/sys_eeprom.c +4 -2
index c487e3a515..f14602af20 100644
@@ -173,9 +173,11 @@ static int read_eeprom(void)
 	struct udevice *dev;
 #ifdef CONFIG_SYS_EEPROM_BUS_NUM
 	ret = i2c_get_chip_for_busnum(CONFIG_SYS_EEPROM_BUS_NUM,
-				      CONFIG_SYS_I2C_EEPROM_ADDR, 1, &dev);
+				      CONFIG_SYS_I2C_EEPROM_ADDR,
+				      CONFIG_SYS_I2C_EEPROM_ADDR_LEN, &dev);
 #else
-	ret = i2c_get_chip_for_busnum(0, CONFIG_SYS_I2C_EEPROM_ADDR, 1, &dev);
+	ret = i2c_get_chip_for_busnum(0, CONFIG_SYS_I2C_EEPROM_ADDR,
+				      CONFIG_SYS_I2C_EEPROM_ADDR_LEN, &dev);
 #endif
 	if (!ret)
 		ret = dm_i2c_read(dev, 0, (void *)&e, sizeof(e));
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 board/freescale/common: fix a bug that failed to read/write eeprom on ls1021atsn

Quoted 6 lines · Biwen Li

From: Biwen Li <[email protected]>

Fix a bug that failed to read/write eeprom on ls1021atsn

---

Quoted 24 lines
 board/freescale/common/sys_eeprom.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
board/freescale/common/sys_eeprom.c +4 -2
index c487e3a515..f14602af20 100644
@@ -173,9 +173,11 @@ static int read_eeprom(void)
 	struct udevice *dev;
 #ifdef CONFIG_SYS_EEPROM_BUS_NUM
 	ret = i2c_get_chip_for_busnum(CONFIG_SYS_EEPROM_BUS_NUM,
-				      CONFIG_SYS_I2C_EEPROM_ADDR, 1, &dev);
+				      CONFIG_SYS_I2C_EEPROM_ADDR,
+				      CONFIG_SYS_I2C_EEPROM_ADDR_LEN, &dev);
 #else
-	ret = i2c_get_chip_for_busnum(0, CONFIG_SYS_I2C_EEPROM_ADDR, 1, &dev);
+	ret = i2c_get_chip_for_busnum(0, CONFIG_SYS_I2C_EEPROM_ADDR,
+				      CONFIG_SYS_I2C_EEPROM_ADDR_LEN, &dev);
 #endif
 	if (!ret)
 		ret = dm_i2c_read(dev, 0, (void *)&e, sizeof(e));
Signature · 1 line
2.17.1
#2 lore raw

PATCH 1/1 board/freescale/common: fix a bug that failed to read/write eeprom on ls1021atsn

In reply to Biwen Li
Quoted 9 lines

-----Original Message-----
From: Biwen Li <[email protected]>
Sent: Monday, October 26, 2020 12:44 PM
To: Priyanka Jain <[email protected]>
Cc: Jiafei Pan <[email protected]>; u-boot at lists.denx.de; Biwen Li <[email protected]>
Subject: [PATCH] board/freescale/common: fix a bug that failed to read/write eeprom on ls1021atsn

Quoted 6 lines

From: Biwen Li <[email protected]>

Fix a bug that failed to read/write eeprom on ls1021atsn

---

<snip>
Applied to fsl-qoriq.
Awaiting upstream

Thanks
Priyanka