]> git.sur5r.net Git - u-boot/commitdiff
powerpc/85xx: use fdt_create_phandle() to create the Fman firmware phandles
authorTimur Tabi <timur@freescale.com>
Tue, 20 Sep 2011 23:24:36 +0000 (18:24 -0500)
committerGerald Van Baren <gvb@unssw.com>
Sat, 15 Oct 2011 13:35:15 +0000 (09:35 -0400)
Function fdt_create_phandle() conveniently creates new phandle properties
using both "linux,phandle" and "phandle", so it should be used by all code
that wants to create a phandle.

The Fman firmware code, which embeds an Fman firmware into the device tree,
was creating the phandle properties manually.  Instead, change it to use
fdt_create_phandle().

Signed-off-by: Timur Tabi <timur@freescale.com>
arch/powerpc/cpu/mpc85xx/fdt.c

index d20c94c0f7c1846f5634baeaf41edc2b1f7f33d6..9d2d76956ed9f6a5cd923413499e742c3cd092df 100644 (file)
@@ -504,9 +504,8 @@ void fdt_fixup_fman_firmware(void *blob)
                       fdt_strerror(rc));
                return;
        }
-       phandle = fdt_alloc_phandle(blob);
-       rc = fdt_setprop_cell(blob, fwnode, "linux,phandle", phandle);
-       if (rc < 0) {
+       phandle = fdt_create_phandle(blob, fwnode);
+       if (!phandle) {
                char s[64];
                fdt_get_path(blob, fwnode, s, sizeof(s));
                printf("Could not add phandle property to node %s: %s\n", s,