From: Marek Vasut Date: Wed, 16 Feb 2022 14:27:59 +0000 (+0100) Subject: cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=e3c2042ae7d188e00e48d984e373a2de505d8b77;p=u-boot.git cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled With DM I2C, the EEPROM bus has been correctly configured in eeprom_execute_command() already. Do not reconfigure it here with hard-coded bus number again. Signed-off-by: Marek Vasut Cc: Heiko Schocher Cc: Tom Rini Reviewed-by: Heiko Schocher --- diff --git a/cmd/eeprom.c b/cmd/eeprom.c index cdd65af763..fc0d444069 100644 --- a/cmd/eeprom.c +++ b/cmd/eeprom.c @@ -149,7 +149,7 @@ static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer, int rcode = 0; uchar addr[3]; -#if defined(CONFIG_SYS_I2C_EEPROM_BUS) +#if !CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_SYS_I2C_EEPROM_BUS) eeprom_init(CONFIG_SYS_I2C_EEPROM_BUS); #endif