mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@kymetacorp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox <barebox@lists.infradead.org>
Subject: [PATCH 2/2] OF: Fix fixups to fix Linux DT instead of Barebox DT
Date: Mon, 4 Jan 2016 19:02:34 +0000	[thread overview]
Message-ID: <1451934159.26955.276.camel@rtred1test09.kymeta.local> (raw)
In-Reply-To: <20160104083257.GA13058@pengutronix.de>

OF fixups cm_cogent_fixup() and hb_fixup() are supposed to modify the
Linux device tree.  And they did originally, but commit
e520a8cc463760d21890b35218e4dac817e7c7e7 changed them to use
for_each_compatible_node(), which iterates through the Barebox DT.
Use new for_each_compatible_node_from() to specify the Linux DT root
as the start point.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
---
 arch/arm/boards/at91sam9x5ek/hw_version.c | 2 +-
 arch/arm/boards/highbank/init.c           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boards/at91sam9x5ek/hw_version.c b/arch/arm/boards/at91sam9x5ek/hw_version.c
index 37eb1f8..2f84d82 100644
--- a/arch/arm/boards/at91sam9x5ek/hw_version.c
+++ b/arch/arm/boards/at91sam9x5ek/hw_version.c
@@ -235,7 +235,7 @@ static int cm_cogent_fixup(struct device_node *root, void *unused)
 	int ret;
 	struct device_node *node;
 
-	for_each_compatible_node(node, NULL, "atmel,hsmci") {
+	for_each_compatible_node_from(node, root, NULL, "atmel,hsmci") {
 		struct device_node *slotnode =
 			of_get_child_by_name(node, "slot");
 		if (!slotnode)
diff --git a/arch/arm/boards/highbank/init.c b/arch/arm/boards/highbank/init.c
index a0d4b30..1cb02e6 100644
--- a/arch/arm/boards/highbank/init.c
+++ b/arch/arm/boards/highbank/init.c
@@ -35,13 +35,13 @@ static int hb_fixup(struct device_node *root, void *unused)
 	__be32 latency;
 
 	if (!(reg & HB_PWRDOM_STAT_SATA)) {
-		for_each_compatible_node(node, NULL, "calxeda,hb-ahci")
+		for_each_compatible_node_from(node, root, NULL, "calxeda,hb-ahci")
 			of_set_property(node, "status", "disabled",
 					sizeof("disabled"), 1);
 	}
 
 	if (!(reg & HB_PWRDOM_STAT_EMMC)) {
-		for_each_compatible_node(node, NULL, "calxeda,hb-sdhci")
+		for_each_compatible_node_from(node, root, NULL, "calxeda,hb-sdhci")
 			of_set_property(node, "status", "disabled",
 					sizeof("disabled"), 1);
 	}
-- 
1.8.3.1


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

  parent reply	other threads:[~2016-01-04 19:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-19  0:13 [PATCH 1/2] of: Add for_each_compatible_node_from iterator Trent Piepho
2015-12-19  0:18 ` [PATCH 2/2] of: Add of_property_for_each_phandle() iterator Trent Piepho
2016-01-04  8:32 ` [PATCH 1/2] of: Add for_each_compatible_node_from iterator Sascha Hauer
2016-01-04 19:01   ` [PATCH 1/2] OF: fix typo in for_each_compatible_node() Trent Piepho
2016-01-05  7:49     ` Sascha Hauer
2016-01-04 19:02   ` Trent Piepho [this message]
2016-01-05  7:50     ` [PATCH 2/2] OF: Fix fixups to fix Linux DT instead of Barebox DT Sascha Hauer
2016-01-04 19:07   ` [PATCH 1/2] of: Add for_each_compatible_node_from iterator Trent Piepho
2016-01-05  7:58     ` Sascha Hauer
2016-01-05  8:05       ` Yegor Yefremov
2016-01-05  8:20         ` Sascha Hauer
2016-01-05  8:30           ` Yegor Yefremov
2016-01-05 18:58       ` Trent Piepho
2016-01-07  7:34         ` 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=1451934159.26955.276.camel@rtred1test09.kymeta.local \
    --to=tpiepho@kymetacorp.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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