From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: barebox@lists.infradead.org
Subject: [PATCH v2 4/6] ARM: mvebu: Check for correct SoC in of_fixup callback
Date: Wed, 17 Sep 2014 22:22:42 +0200 [thread overview]
Message-ID: <1410985364-7105-5-git-send-email-sebastian.hesselbarth@gmail.com> (raw)
In-Reply-To: <1410985364-7105-1-git-send-email-sebastian.hesselbarth@gmail.com>
From: Sascha Hauer <s.hauer@pengutronix.de>
Only run the fixup when we are actually on the corresponding
SoC.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: barebox@lists.infradead.org
---
arch/arm/mach-mvebu/armada-370-xp.c | 3 +++
arch/arm/mach-mvebu/dove.c | 3 +++
arch/arm/mach-mvebu/kirkwood.c | 3 +++
3 files changed, 9 insertions(+)
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 1dedcfc55467..57f6a5fe0ddc 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -57,6 +57,9 @@ static int armada_370_xp_init_soc(struct device_node *root, void *context)
unsigned long phys_base, phys_size;
u32 reg;
+ if (!of_machine_is_compatible("marvell,armada-370-xp"))
+ return 0;
+
mvebu_set_reset(armada_370_xp_reset_cpu);
barebox_set_model("Marvell Armada 370/XP");
diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c
index 31d2bb57f832..c2852f8986ae 100644
--- a/arch/arm/mach-mvebu/dove.c
+++ b/arch/arm/mach-mvebu/dove.c
@@ -81,6 +81,9 @@ static int dove_init_soc(struct device_node *root, void *context)
{
unsigned long phys_base, phys_size;
+ if (!of_machine_is_compatible("marvell,dove"))
+ return 0;
+
mvebu_set_reset(dove_reset_cpu);
barebox_set_model("Marvell Dove");
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index 8ab2849ba2e4..d7903f732eac 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -55,6 +55,9 @@ static int kirkwood_init_soc(struct device_node *root, void *context)
{
unsigned long phys_base, phys_size;
+ if (!of_machine_is_compatible("marvell,kirkwood"))
+ return 0;
+
mvebu_set_reset(kirkwood_reset_cpu);
barebox_set_model("Marvell Kirkwood");
--
2.0.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-09-17 20:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 20:22 [PATCH v2 0/6] mvebu multi SoC support Sebastian Hesselbarth
2014-09-17 20:22 ` [PATCH v2 1/6] ARM: mvebu: Add common reset_cpu function Sebastian Hesselbarth
2014-09-17 20:22 ` [PATCH v2 2/6] ARM: mvebu: Add machine compatible to mbus ranges Sebastian Hesselbarth
2014-09-17 20:22 ` [PATCH v2 3/6] ARM: mvebu: Simplify memory init order Sebastian Hesselbarth
2014-09-17 20:22 ` Sebastian Hesselbarth [this message]
2014-09-17 20:22 ` [PATCH v2 5/6] ARM: mvebu: Allow multiple SoCs Sebastian Hesselbarth
2014-09-17 20:22 ` [PATCH v2 6/6] ARM: Add mvebu_defconfig Sebastian Hesselbarth
2014-09-20 17:24 ` Sebastian Hesselbarth
2014-09-23 5:58 ` Sascha Hauer
2014-09-19 5:47 ` [PATCH v2 0/6] mvebu multi SoC support Sascha Hauer
2014-09-19 6:44 ` Sebastian Hesselbarth
2014-09-19 7:55 ` Sascha Hauer
2014-09-19 8:25 ` Sebastian Hesselbarth
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=1410985364-7105-5-git-send-email-sebastian.hesselbarth@gmail.com \
--to=sebastian.hesselbarth@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