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 <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
Marek Vasut 2022-02-16 15:27:59 +01:00 committed by Heiko Schocher
parent 6db539f983
commit e3c2042ae7

View File

@ -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