[PATCH 5/8] ARM: nxp-imx8mq-evk: Add missing compatibility check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing compatibility check to imx8mq_evk_mem_init() to prevent it
from being executed for other i.MX8MQ boards.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 arch/arm/boards/nxp-imx8mq-evk/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/nxp-imx8mq-evk/board.c b/arch/arm/boards/nxp-imx8mq-evk/board.c
index 868c25ebb..3645e5e71 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/board.c
+++ b/arch/arm/boards/nxp-imx8mq-evk/board.c
@@ -25,6 +25,9 @@
 
 static int imx8mq_evk_mem_init(void)
 {
+	if (!of_machine_is_compatible("fsl,imx8mq-evk"))
+		return 0;
+
 	arm_add_mem_device("ram0", 0x40000000, SZ_2G);
 
 	request_sdram_region("ATF", 0x40000000, SZ_128K);
-- 
2.17.1


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



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux