public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] powerpc/85xx: add support the ePAPR "phandle" property
Date: Fri, 6 May 2011 12:56:33 -0500	[thread overview]
Message-ID: <1304704593-9067-2-git-send-email-timur@freescale.com> (raw)
In-Reply-To: <1304704593-9067-1-git-send-email-timur@freescale.com>

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 fdt_qportal() to support both
properties.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 arch/powerpc/cpu/mpc85xx/portals.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/portals.c b/arch/powerpc/cpu/mpc85xx/portals.c
index c014163..bb0ae70 100644
--- a/arch/powerpc/cpu/mpc85xx/portals.c
+++ b/arch/powerpc/cpu/mpc85xx/portals.c
@@ -151,8 +151,19 @@ static int fdt_qportal(void *blob, int off, int id, char *name,
 			dev_handle = fdt_get_phandle(blob, dev_off);
 			if (dev_handle <= 0) {
 				dev_handle = fdt_alloc_phandle(blob);
-				fdt_setprop_cell(blob, dev_off,
+				ret = fdt_setprop_cell(blob, dev_off,
+					"phandle", dev_handle);
+				if (ret < 0)
+					return ret;
+				/*
+				 * For now, also set the deprecated
+				 * "linux,phandle" property, so that we don't
+				 * break older kernels.
+				 */
+				ret = fdt_setprop_cell(blob, dev_off,
 					"linux,phandle", dev_handle);
+				if (ret < 0)
+					return ret;
 			}
 
 			ret = fdt_setprop(blob, childoff, "dev-handle",
-- 
1.7.3.4

  reply	other threads:[~2011-05-06 17:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 17:56 [U-Boot] [PATCH 1/2] fdt: add support the ePAPR "phandle" property Timur Tabi
2011-05-06 17:56 ` Timur Tabi [this message]
2011-05-06 18:46 ` Grant Likely
2011-05-06 18:53   ` Timur Tabi

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=1304704593-9067-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox