mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Peter Rosin <peda@axentia.se>, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 2/5] ARM: at91: at91sam9263ek: add device tree check for board code
Date: Wed, 22 Sep 2021 08:49:58 +0200	[thread overview]
Message-ID: <20210922065000.20970-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210922065000.20970-1-a.fatoum@pengutronix.de>

Most board code is guarded by a compatible check, but not add_smc_devices().
Remedy this.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/boards/at91sam9263ek/of_init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/at91sam9263ek/of_init.c b/arch/arm/boards/at91sam9263ek/of_init.c
index 3cb2fe22c967..92301c80d6c8 100644
--- a/arch/arm/boards/at91sam9263ek/of_init.c
+++ b/arch/arm/boards/at91sam9263ek/of_init.c
@@ -15,6 +15,9 @@
 
 static int add_smc_devices(void)
 {
+	if (!of_machine_is_compatible("atmel,at91sam9263ek"))
+		return 0;
+
 	add_generic_device("at91sam9-smc", 0, NULL, AT91SAM9263_BASE_SMC0, 0x200,
 			   IORESOURCE_MEM, NULL);
 	add_generic_device("at91sam9-smc", 1, NULL, AT91SAM9263_BASE_SMC1, 0x200,
-- 
2.30.2


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


  parent reply	other threads:[~2021-09-22  6:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22  6:49 [PATCH 0/5] ARM: at91: sama5d3_xplained: migrate to DT Ahmad Fatoum
2021-09-22  6:49 ` [PATCH master 1/5] fs: fat: pbl: support >32M alignment for first partition Ahmad Fatoum
2021-09-22  6:49 ` Ahmad Fatoum [this message]
2021-09-22  6:49 ` [PATCH 3/5] Documentation: boards: at91: remove done TODOs Ahmad Fatoum
2021-09-22 15:29   ` Sam Ravnborg
2021-09-22  6:50 ` [PATCH 4/5] ARM: at91: sam9_smc: register driver earlier Ahmad Fatoum
2021-09-22  6:50 ` [PATCH 5/5] ARM: AT91: migrate sama5d3-xplained to DT Ahmad Fatoum
2021-10-01 13:36 ` [PATCH 0/5] ARM: at91: sama5d3_xplained: migrate " 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=20210922065000.20970-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=peda@axentia.se \
    --subject='Re: [PATCH master 2/5] ARM: at91: at91sam9263ek: add device tree check for board code' \
    /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

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