Skip to contentSkip to conversation

powerpc/85xx: add support the ePAPR "phandle" property

PATCH New Timur Tabi 2 participants 2 messages May 10, 2011 – Jul 22, 2011 PowerPC

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH v3 2/2 powerpc/85xx: add support the ePAPR "phandle" property

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 use the new function, fdt_create_phandle(). This function abstracts the creation of phandle properties.

---
 arch/powerpc/cpu/mpc85xx/portals.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/cpu/mpc85xx/portals.c +4 -2
index c014163..ecaa30d 100644
@@ -151,8 +151,10 @@ 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,
-					"linux,phandle", dev_handle);
+				ret = fdt_create_phandle(blob, dev_off,
+							 dev_handle);
+				if (ret < 0)
+					return ret;
 			}
 
 			ret = fdt_setprop(blob, childoff, "dev-handle",
Signature · 1 line
1.7.3.4
Applied
#1 lore raw

PATCH v3 2/2 powerpc/85xx: add support the ePAPR "phandle" property

Quoted 10 lines · Timur Tabi

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 use the new function, fdt_create_phandle(). This function abstracts the creation of phandle properties.

---
arch/powerpc/cpu/mpc85xx/portals.c | 6 ++++--

1 files changed, 4 insertions(+), 2 deletions(-)

applied to 85xx (since fdt bits are pulled in)

- k