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

Marek Vasut marex at denx.de
Wed Apr 24 22:01:06 UTC 2019


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 at 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.

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list