diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-10-14 22:50:00 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-18 09:56:17 -0400 |
commit | f1f208e54d08ccf00121c700a9bb1fe3e55b3a51 (patch) | |
tree | 600ef614f1c0c7caf40746213a28fc01721e7e97 | |
parent | 2c51d97ee88da897db8405f659d1735ffe86ad7c (diff) |
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[mpe: Unsplit warning printf()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 88d621a7bf67..f33ff4163a51 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -2410,14 +2410,11 @@ static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, | |||
2410 | has_phandle = 1; | 2410 | has_phandle = 1; |
2411 | } | 2411 | } |
2412 | 2412 | ||
2413 | /* Add a "linux,phandle" property if no "phandle" property already | 2413 | /* Add a "phandle" property if none already exist */ |
2414 | * existed. | ||
2415 | */ | ||
2416 | if (!has_phandle) { | 2414 | if (!has_phandle) { |
2417 | soff = dt_find_string("linux,phandle"); | 2415 | soff = dt_find_string("phandle"); |
2418 | if (soff == 0) | 2416 | if (soff == 0) |
2419 | prom_printf("WARNING: Can't find string index for" | 2417 | prom_printf("WARNING: Can't find string index for <phandle> node %s\n", path); |
2420 | " <linux-phandle> node %s\n", path); | ||
2421 | else { | 2418 | else { |
2422 | dt_push_token(OF_DT_PROP, mem_start, mem_end); | 2419 | dt_push_token(OF_DT_PROP, mem_start, mem_end); |
2423 | dt_push_token(4, mem_start, mem_end); | 2420 | dt_push_token(4, mem_start, mem_end); |
@@ -2477,9 +2474,9 @@ static void __init flatten_device_tree(void) | |||
2477 | dt_string_start = mem_start; | 2474 | dt_string_start = mem_start; |
2478 | mem_start += 4; /* hole */ | 2475 | mem_start += 4; /* hole */ |
2479 | 2476 | ||
2480 | /* Add "linux,phandle" in there, we'll need it */ | 2477 | /* Add "phandle" in there, we'll need it */ |
2481 | namep = make_room(&mem_start, &mem_end, 16, 1); | 2478 | namep = make_room(&mem_start, &mem_end, 16, 1); |
2482 | strcpy(namep, "linux,phandle"); | 2479 | strcpy(namep, "phandle"); |
2483 | mem_start = (unsigned long)namep + strlen(namep) + 1; | 2480 | mem_start = (unsigned long)namep + strlen(namep) + 1; |
2484 | 2481 | ||
2485 | /* Build string array */ | 2482 | /* Build string array */ |