Skip to content

Commit

Permalink
cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Heiko Schocher <[email protected]>
Cc: Tom Rini <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
  • Loading branch information
Marek Vasut authored and hsdenx committed Mar 23, 2022
1 parent 6db539f commit e3c2042
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e3c2042

Please sign in to comment.