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: Re: [PATCH 1/2] of: Add for_each_compatible_node_from iterator
Date: Mon, 4 Jan 2016 19:07:27 +0000	[thread overview]
Message-ID: <1451934452.26955.281.camel@rtred1test09.kymeta.local> (raw)
In-Reply-To: <20160104083257.GA13058@pengutronix.de>

On Mon, 2016-01-04 at 09:32 +0100, Sascha Hauer wrote:
> On Sat, Dec 19, 2015 at 12:13:59AM +0000, Trent Piepho wrote:
> > The existing iterator for_each_compatible_node() searches for each
> > compatible node starting from the root of the loaded device tree.
> > This means it only works on the barebox device tree and not the tree
> > to be passed to the Linux kernel, which is what an of_fixup would
> > probably want to use.
> > 
> > This adds for_each_compatible_node_from(), which takes an additional
> > parameter of a root to search from.  This could be the device tree to
> > be used for the kernel.  It could also be used to search just a
> > subtree.
> > 
> > Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
> 
> Applied, thanks
> 
> > ---
> > 
> > It's possible the fixups in cm_cogent_fixup() and hb_fixup() should
> > be using this.  It's not clear to me if they want to modify the barebox
> > device tree or the Linux device tree or both.
> 
> It's always the Linux device tree that is fixed up in the OF fixups.

Sent patch to fix them.

Couldn't one also use the of fixup system to modify the barebox DT?  In
order to support multiple board variants, I added DT nodes that specify
what nodes should be enabled and/or disabled for different board
versions.  An OF fixup applies this to the Linux DT.  I haven't had to
modify the barebox DT for different boards but anticipate that happening
for the next board and I was planning to use the same system.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-19  0:13 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   ` [PATCH 2/2] OF: Fix fixups to fix Linux DT instead of Barebox DT Trent Piepho
2016-01-05  7:50     ` Sascha Hauer
2016-01-04 19:07   ` Trent Piepho [this message]
2016-01-05  7:58     ` [PATCH 1/2] of: Add for_each_compatible_node_from iterator 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=1451934452.26955.281.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