mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! common: add TQ EEPROM support
@ 2024-02-13 13:47 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2024-02-13 13:47 UTC (permalink / raw)
  To: Barebox List

&eeprom.vard is not yet initialized, use &raw.tq_hw_data instead which
we have just read from the EEPROM.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/boards/tq/tq_eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/boards/tq/tq_eeprom.c b/common/boards/tq/tq_eeprom.c
index edc57b01f5..220d75ecab 100644
--- a/common/boards/tq/tq_eeprom.c
+++ b/common/boards/tq/tq_eeprom.c
@@ -128,7 +128,7 @@ struct tq_eeprom *pbl_tq_read_eeprom(struct pbl_i2c *i2c, u8 addr)
 	if (ret)
 		return NULL;
 
-	if (tq_vard_valid(&eeprom.vard))
+	if (tq_vard_valid(&raw.tq_hw_data.vard))
 		eeprom.vard = raw.tq_hw_data.vard;
 
 	memcpy(eeprom.mac, raw.mac, TQ_EE_MAC_BYTES);
-- 
2.39.2




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-13 13:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 13:47 [PATCH] fixup! common: add TQ EEPROM support Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox