mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: i.MX: scb9328: Add missing machine protection
@ 2020-02-18 15:32 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2020-02-18 15:32 UTC (permalink / raw)
  To: Barebox List

Make sure scb9328_devices_init() is only executed on the correct
machine.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/scb9328/scb9328.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c
index d1f741a70e..87fb6affbd 100644
--- a/arch/arm/boards/scb9328/scb9328.c
+++ b/arch/arm/boards/scb9328/scb9328.c
@@ -31,6 +31,9 @@
 
 static int scb9328_devices_init(void)
 {
+	if (!of_machine_is_compatible("stx,scb9328"))
+		return 0;
+
 	/* CS3 becomes CS3 by clearing reset default bit 1 in FMCR */
 	writel(0x1, MX1_SCM_BASE_ADDR + MX1_FMCR);
 
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

only message in thread, other threads:[~2020-02-18 15:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 15:32 [PATCH] ARM: i.MX: scb9328: Add missing machine protection Sascha Hauer

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