Commit f1f208e5 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Michael Ellerman

powerpc/prom_init: Generate "phandle" instead of "linux, phandle"

When creating the boot-time FDT from an actual Open Firmware live
tree, let's generate "phandle" properties for the phandles instead
of the old deprecated "linux,phandle".
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
[mpe: Unsplit warning printf()]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 2c51d97e
...@@ -2410,14 +2410,11 @@ static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, ...@@ -2410,14 +2410,11 @@ static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start,
has_phandle = 1; has_phandle = 1;
} }
/* Add a "linux,phandle" property if no "phandle" property already /* Add a "phandle" property if none already exist */
* existed.
*/
if (!has_phandle) { if (!has_phandle) {
soff = dt_find_string("linux,phandle"); soff = dt_find_string("phandle");
if (soff == 0) if (soff == 0)
prom_printf("WARNING: Can't find string index for" prom_printf("WARNING: Can't find string index for <phandle> node %s\n", path);
" <linux-phandle> node %s\n", path);
else { else {
dt_push_token(OF_DT_PROP, mem_start, mem_end); dt_push_token(OF_DT_PROP, mem_start, mem_end);
dt_push_token(4, mem_start, mem_end); dt_push_token(4, mem_start, mem_end);
...@@ -2477,9 +2474,9 @@ static void __init flatten_device_tree(void) ...@@ -2477,9 +2474,9 @@ static void __init flatten_device_tree(void)
dt_string_start = mem_start; dt_string_start = mem_start;
mem_start += 4; /* hole */ mem_start += 4; /* hole */
/* Add "linux,phandle" in there, we'll need it */ /* Add "phandle" in there, we'll need it */
namep = make_room(&mem_start, &mem_end, 16, 1); namep = make_room(&mem_start, &mem_end, 16, 1);
strcpy(namep, "linux,phandle"); strcpy(namep, "phandle");
mem_start = (unsigned long)namep + strlen(namep) + 1; mem_start = (unsigned long)namep + strlen(namep) + 1;
/* Build string array */ /* Build string array */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment