summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc85xx/fdt.c
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-09-20 18:24:36 -0500
committerGerald Van Baren <gvb@unssw.com>2011-10-15 09:35:15 -0400
commita2c1229c39e39d9a5ff90055d78b8de061943097 (patch)
tree71c2c28699ddddcf64d9873bd162fa4960a23c98 /arch/powerpc/cpu/mpc85xx/fdt.c
parent50bf17bd15d439b183a29bdb453b65217cfbef3b (diff)
powerpc/85xx: use fdt_create_phandle() to create the Fman firmware phandles
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>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/fdt.c')
-rw-r--r--arch/powerpc/cpu/mpc85xx/fdt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index d20c94c0f7..9d2d76956e 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -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,