eeprom: fix DM_I2C support with CONFIG_SYS_I2C_EEPROM_BUS
PATCH 1/2 eeprom: fix DM_I2C support with CONFIG_SYS_I2C_EEPROM_BUS
This fixes eeprom for DM_I2C in u-boot-socfpga/master
commit 3c43ab903d33 ("eeprom: fix DM_I2C support without CONFIG_SYS_I2C_EEPROM_BUS") which only fixed it without CONFIG_SYS_I2C_EEPROM_BUS defined.
---
Please amend to commit 3c43ab903d33 in u-boot-socfpga/master
--- cmd/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/eeprom.c +1 -1
@@ -168,7 +168,7 @@ static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer,uchar addr[3 ];#if defined(CONFIG_SYS_I2C_EEPROM_BUS ) -i2c_set_bus_num (CONFIG_SYS_I2C_EEPROM_BUS ); +eeprom_init (CONFIG_SYS_I2C_EEPROM_BUS );#endif while (offset < end) {
Signature · 1 line
2.17.1
PATCH 2/2 arm: socfpga: fix compiling vining_fpga with DM_I2C
commit 6ce1f2d2ce4d ("arm: socfpga: move vining_fpga to DM_I2C") in u-boot-socfpga/master fails to compile as vining has non-DM compatibility for I2C disabled.
---
Please amend to commit 6ce1f2d2ce4d in u-boot-socfpga/master
--- board/samtec/vining_fpga/socfpga.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
board/samtec/vining_fpga/socfpga.c +1 -8
@@ -52,14 +52,7 @@ int misc_init_r(void)u32 serial;int ret; -/* EEPROM is at bus 0. */ - ret =i2c_set_bus_num (0 ); -if (ret) { -puts ("Cannot select EEPROM I2C bus.\n" ); -return 0 ; - } - -/* EEPROM is at address 0x50. */ +/* EEPROM is at address 0x50 (at bus CONFIG_SYS_EEPROM_BUS_NUM). */ ret =eeprom_read (0x50 ,0 , data,sizeof (data));if (ret) {puts ("Cannot read I2C EEPROM.\n" );
Signature · 1 line
2.17.1
PATCH 1/2 eeprom: fix DM_I2C support with CONFIG_SYS_I2C_EEPROM_BUS
In reply to Simon GoldschmidtQuoted 18 lines · Simon Goldschmidt
This fixes eeprom for
DM_I2Cin u-boot-socfpga/master
commit3c43ab903d33("eeprom: fixDM_I2Csupport withoutCONFIG_SYS_I2C_EEPROM_BUS") which only fixed it withoutCONFIG_SYS_I2C_EEPROM_BUSdefined.Signed-off-by Simon Goldschmidt <[email protected]>---
Please amend to commit
3c43ab903d33in u-boot-socfpga/master--- cmd/eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/eeprom.c +0
-0
cmd/eeprom.c static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer, · line 174
Quoted 8 lines
cmd/eeprom.c +1
-1@@ -168,7 +168,7 @@ static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer,uchar addr[3 ];#if defined(CONFIG_SYS_I2C_EEPROM_BUS ) -i2c_set_bus_num (CONFIG_SYS_I2C_EEPROM_BUS ); +eeprom_init (CONFIG_SYS_I2C_EEPROM_BUS );#endif while (offset < end) {
Squashed both, thanks.
Signature · 2 lines
Best regards, Marek Vasut