diff mbox series

[U-Boot,1/2] eeprom: fix DM_I2C support with CONFIG_SYS_I2C_EEPROM_BUS

Message ID 20190424174837.17631-1-simon.k.r.goldschmidt@gmail.com
State Accepted
Delegated to: Marek Vasut
Headers show
Series [U-Boot,1/2] eeprom: fix DM_I2C support with CONFIG_SYS_I2C_EEPROM_BUS | expand

Commit Message

Simon Goldschmidt April 24, 2019, 5:48 p.m. UTC
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.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---

Please amend to commit 3c43ab903d33 in u-boot-socfpga/master
---
 cmd/eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut April 24, 2019, 10:01 p.m. UTC | #1
On 4/24/19 7:48 PM, Simon Goldschmidt wrote:
> 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.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
> 
> Please amend to commit 3c43ab903d33 in u-boot-socfpga/master
> ---
>  cmd/eeprom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/eeprom.c b/cmd/eeprom.c
> index 9e44960c7d..7b1f81477f 100644
> --- a/cmd/eeprom.c
> +++ b/cmd/eeprom.c
> @@ -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.
diff mbox series

Patch

diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 9e44960c7d..7b1f81477f 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -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) {