[PATCH 1/1] Revert: "cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled"
Tom Rini
trini at konsulko.com
Sat May 30 00:52:50 CEST 2026
On Tue, May 26, 2026 at 08:00:41AM +0200, daniel.nehrkorn at esd.eu wrote:
> From: Daniel Nehrkorn <daniel.nehrkorn at esd.eu>
>
> We need the EEPROM bus configuration, if we have the env located in EEPROM.
> Since there is no eeprom_execute_command() anymore, we have to configure
> it implicitly.
>
> This reverts commit e3c2042ae7d188e00e48d984e373a2de505d8b77.
>
> Signed-off-by: Daniel Nehrkorn <daniel.nehrkorn at esd.eu>
> ---
> cmd/eeprom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/eeprom.c b/cmd/eeprom.c
> index cf89cfce3e4..ac7ed6f58bd 100644
> --- a/cmd/eeprom.c
> +++ b/cmd/eeprom.c
> @@ -151,7 +151,7 @@ static int eeprom_rw(unsigned dev_addr, unsigned offset, uchar *buffer,
> int rcode = 0;
> uchar addr[3];
>
> -#if !CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_SYS_I2C_EEPROM_BUS)
> +#if defined(CONFIG_SYS_I2C_EEPROM_BUS)
> eeprom_init(CONFIG_SYS_I2C_EEPROM_BUS);
> #endif
>
So, this is reverting a 4 year old commit. You have a platform with
ENV_IS_IN_EEPROM which is admittedly not often tested. Perhaps we should
be calling eeprom_init in env/eeprom.c instead? Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260529/81c12591/attachment.sig>
More information about the U-Boot
mailing list