mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH v3 5/8] ARM: nxp-imx8mq-evk: Add missing compatibility check
Date: Thu, 20 Sep 2018 23:00:59 -0700	[thread overview]
Message-ID: <20180921060102.16341-6-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20180921060102.16341-1-andrew.smirnov@gmail.com>

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@gmail.com>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-09-21  6:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  6:00 [PATCH v3 0/8] i.MX8MQ EVK miscellanea Andrey Smirnov
2018-09-21  6:00 ` [PATCH v3 1/8] clk: i.MX8MQ: Bump refcounters of various important clocks Andrey Smirnov
2018-09-21  6:00 ` [PATCH v3 2/8] ARM: i.MX8MQ: Add missing node for ECSPI1 Andrey Smirnov
2018-09-21  6:00 ` [PATCH v3 3/8] ARM: i.MX8MQ: Configure USDHC1,2 clocks Andrey Smirnov
2018-09-21  6:00 ` [PATCH v3 4/8] ARM: i.MX8MQ: Configure FEC1 clocks Andrey Smirnov
2018-09-21  6:00 ` Andrey Smirnov [this message]
2018-09-21  6:01 ` [PATCH v3 6/8] ARM: nxp-imx8mq-evk: Add FEC's PHY configuration code Andrey Smirnov
2018-09-21  6:01 ` [PATCH v3 7/8] ARM: i.MX: esdctl: Add memory size detection for i.MX8MQ Andrey Smirnov
2018-09-21  6:01 ` [PATCH v3 8/8] ARM: nxp-imx8mq-evk: Make use of memory size detection code Andrey Smirnov
2018-09-24  7:00 ` [PATCH v3 0/8] i.MX8MQ EVK miscellanea Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180921060102.16341-6-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox