[PATCH] fixup! common: add TQ EEPROM support

Sascha Hauer s.hauer at pengutronix.de
Tue Feb 13 05:47:38 PST 2024


&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 at 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




More information about the barebox mailing list