diff options
author | Biwen Li <biwen.li@nxp.com> | 2020-10-26 15:14:05 +0800 |
---|---|---|
committer | Priyanka Jain <priyanka.jain@nxp.com> | 2020-12-10 13:56:39 +0530 |
commit | e343ae7c967f5386f97fc9087383b54ed1967786 (patch) | |
tree | 53c0e11fc8716dbc620953593b63ec7ab7f1910c /board | |
parent | ee7c1225e3d8b3871833f4cbd80e122cb5fa52d2 (diff) | |
download | u-boot-e343ae7c967f5386f97fc9087383b54ed1967786.zip u-boot-e343ae7c967f5386f97fc9087383b54ed1967786.tar.gz u-boot-e343ae7c967f5386f97fc9087383b54ed1967786.tar.bz2 |
board/freescale/common: fix a bug that failed to read/write eeprom on ls1021atsn
Fix a bug that failed to read/write eeprom on ls1021atsn
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/common/sys_eeprom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c index 728245d..33ae4c1 100644 --- a/board/freescale/common/sys_eeprom.c +++ b/board/freescale/common/sys_eeprom.c @@ -175,9 +175,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)); |