diff mbox series

[12/12] powerpc/prom_init: Generate "phandle" instead of "linux, phandle"

Message ID 20181015025000.4522-12-benh@kernel.crashing.org (mailing list archive)
State Accepted
Commit f1f208e54d08ccf00121c700a9bb1fe3e55b3a51
Headers show
Series [01/12] powerpc/prom_init: Make of_workarounds static | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning next/apply_patch Patch failed to apply
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Benjamin Herrenschmidt Oct. 15, 2018, 2:50 a.m. UTC
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>
---
 arch/powerpc/kernel/prom_init.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comments

Michael Ellerman Oct. 19, 2018, 2:51 a.m. UTC | #1
On Mon, 2018-10-15 at 02:50:00 UTC, Benjamin Herrenschmidt wrote:
> 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>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/f1f208e54d08ccf00121c700a9bb1f

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 57762f19f136..64409d2ecaee 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2407,14 +2407,12 @@  static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start,
 			has_phandle = 1;
 	}
 
-	/* Add a "linux,phandle" property if no "phandle" property already
-	 * existed.
-	 */
+	/* Add a "phandle" property if none already exist */
 	if (!has_phandle) {
-		soff = dt_find_string("linux,phandle");
+		soff = dt_find_string("phandle");
 		if (soff == 0)
 			prom_printf("WARNING: Can't find string index for"
-				    " <linux-phandle> node %s\n", path);
+				    " <phandle> node %s\n", path);
 		else {
 			dt_push_token(OF_DT_PROP, mem_start, mem_end);
 			dt_push_token(4, mem_start, mem_end);
@@ -2474,9 +2472,9 @@  static void __init flatten_device_tree(void)
 	dt_string_start = mem_start;
 	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);
-	strcpy(namep, "linux,phandle");
+	strcpy(namep, "phandle");
 	mem_start = (unsigned long)namep + strlen(namep) + 1;
 
 	/* Build string array */