* [PATCH] ARM: Layerscape: ls1046ardb: add missing machine protection
@ 2024-11-07 7:24 Sascha Hauer
2024-11-08 9:52 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2024-11-07 7:24 UTC (permalink / raw)
To: Barebox List
rdb_late_init() should only run on the appropriate machine. Check the
machine before continuing.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ls1046ardb/board.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boards/ls1046ardb/board.c b/arch/arm/boards/ls1046ardb/board.c
index ee70171ca3..9570344b92 100644
--- a/arch/arm/boards/ls1046ardb/board.c
+++ b/arch/arm/boards/ls1046ardb/board.c
@@ -125,6 +125,9 @@ static struct nxid *nxp_nxid_read(const char *filename, unsigned int offset)
static int rdb_late_init(void)
{
+ if (!of_machine_is_compatible("fsl,ls1046a-rdb"))
+ return 0;
+
nxp_nxid_read("/dev/eeprom", 256);
return 0;
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-08 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-07 7:24 [PATCH] ARM: Layerscape: ls1046ardb: add missing machine protection Sascha Hauer
2024-11-08 9:52 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox