* [PATCH] cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled
@ 2022-02-16 14:27 Marek Vasut
2022-03-23 5:57 ` Heiko Schocher
2022-03-23 9:11 ` Heiko Schocher
0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2022-02-16 14:27 UTC (permalink / raw)
To: u-boot; +Cc: Marek Vasut, Heiko Schocher, Tom Rini
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>
---
cmd/eeprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index cdd65af763b..fc0d4440694 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
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled
2022-02-16 14:27 [PATCH] cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled Marek Vasut
@ 2022-03-23 5:57 ` Heiko Schocher
2022-03-23 9:11 ` Heiko Schocher
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2022-03-23 5:57 UTC (permalink / raw)
To: Marek Vasut, u-boot; +Cc: Tom Rini
Hello Marek,
On 16.02.22 15:27, Marek Vasut wrote:
> 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>
> ---
> cmd/eeprom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled
2022-02-16 14:27 [PATCH] cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled Marek Vasut
2022-03-23 5:57 ` Heiko Schocher
@ 2022-03-23 9:11 ` Heiko Schocher
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2022-03-23 9:11 UTC (permalink / raw)
To: Marek Vasut, u-boot; +Cc: Tom Rini
Hello Marek,
On 16.02.22 15:27, Marek Vasut wrote:
> 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>
> ---
> cmd/eeprom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-i2c master
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs@denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-23 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 14:27 [PATCH] cmd: eeprom: Do not rewrite EEPROM I2C bus with DM I2C enabled Marek Vasut
2022-03-23 5:57 ` Heiko Schocher
2022-03-23 9:11 ` Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).