]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc/85xx: add support the ePAPR "phandle" property
authorTimur Tabi <timur@freescale.com>
Tue, 10 May 2011 20:28:14 +0000 (15:28 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 22 Jul 2011 06:49:39 +0000 (01:49 -0500)
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.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/cpu/mpc85xx/portals.c

index c014163e3ceaec6fe53a3182faca1f4b7867224a..ecaa30de84b3df7e9bcaed69f801042da5a5746c 100644 (file)
@@ -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",