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: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH master 3/3] ARM: at91: sama5d27-giantboard: fix multi-image compatibility
Date: Wed,  2 Sep 2020 15:13:07 +0200	[thread overview]
Message-ID: <20200902131307.17613-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20200902131307.17613-1-a.fatoum@pengutronix.de>

For multi-image compatibility, board code needs to be guarded by a check
against the compatible. Retrofit the check.

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

diff --git a/arch/arm/boards/sama5d27-giantboard/board.c b/arch/arm/boards/sama5d27-giantboard/board.c
index 1d4453ede35b..006c6ffad5cd 100644
--- a/arch/arm/boards/sama5d27-giantboard/board.c
+++ b/arch/arm/boards/sama5d27-giantboard/board.c
@@ -3,9 +3,13 @@
 #include <init.h>
 #include <envfs.h>
 #include <bbu.h>
+#include <of.h>
 
 static int giantboard_device_init(void)
 {
+	if (!of_machine_is_compatible("groboards,sama5d27-giantboard"))
+		return 0;
+
 	bbu_register_std_file_update("microSD", BBU_HANDLER_FLAG_DEFAULT,
 				     "/mnt/mmc1.0/barebox.bin",
 				     filetype_arm_barebox);
-- 
2.28.0


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

  parent reply	other threads:[~2020-09-02 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 13:13 [PATCH master 1/3] clk: at91: sama5d2: fix buffer overflow of clk parent_names Ahmad Fatoum
2020-09-02 13:13 ` [PATCH master 2/3] ARM: at91: fix link error when CONFIG_BOOTM=n Ahmad Fatoum
2020-09-02 13:13 ` Ahmad Fatoum [this message]
2020-09-14 13:19 ` [PATCH master 1/3] clk: at91: sama5d2: fix buffer overflow of clk parent_names 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=20200902131307.17613-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --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