From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] [v2] fdt: add support for the ePAPR "phandle" property
Date: Fri, 6 May 2011 14:56:37 -0500 [thread overview]
Message-ID: <1304711797-10549-1-git-send-email-timur@freescale.com> (raw)
The ePAPR specification says that phandle properties should be called
"phandle", and not "linux,phandle". To facilitate the migration from
"linux,phandle" to "phandle", we update some functions to support both
properties.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
Upstream libfdt already has the ePAPR changes, so would someone please pull
in those changes?
common/fdt_support.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 496040b..85715ff 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -1187,6 +1187,12 @@ int fdt_alloc_phandle(void *blob)
for (offset = fdt_next_node(blob, -1, NULL); offset >= 0;
offset = fdt_next_node(blob, offset, NULL)) {
+ /* Check the ePAPR-compliant "phandle" property name */
+ val = fdt_getprop(blob, offset, "phandle", &len);
+ if (val)
+ phandle = max(*val, phandle);
+
+ /* Also check the deprecated "linux,phandle" property name */
val = fdt_getprop(blob, offset, "linux,phandle", &len);
if (val)
phandle = max(*val, phandle);
--
1.7.3.4
reply other threads:[~2011-05-06 19:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1304711797-10549-1-git-send-email-timur@freescale.com \
--to=timur@freescale.com \
--cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.