linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Look for "stdout-path" when setting up legacy consoles
@ 2018-11-30  3:54 Benjamin Herrenschmidt
  2018-11-30 13:12 ` Rob Herring
  2018-12-02 11:02 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2018-11-30  3:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Rob Herring

Commit 78e5dfea8 "powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'"
broke the default console on a number of embedded PowerPC systems, because it
failed to also update the code in arch/powerpc/kernel/legacy_serial.c to
look for that property in addition to the old one.

This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Fixes: 78e5dfea8 powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'
---
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 33b34a5..5b9dce1 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -372,6 +372,8 @@ void __init find_legacy_serial_ports(void)
 
 	/* Now find out if one of these is out firmware console */
 	path = of_get_property(of_chosen, "linux,stdout-path", NULL);
+	if (path == NULL)
+		path = of_get_property(of_chosen, "stdout-path", NULL);
 	if (path != NULL) {
 		stdout = of_find_node_by_path(path);
 		if (stdout)
@@ -595,8 +597,10 @@ static int __init check_legacy_serial_console(void)
 	/* We are getting a weird phandle from OF ... */
 	/* ... So use the full path instead */
 	name = of_get_property(of_chosen, "linux,stdout-path", NULL);
+	if (name == NULL)
+		name = of_get_property(of_chosen, "stdout-path", NULL);
 	if (name == NULL) {
-		DBG(" no linux,stdout-path !\n");
+		DBG(" no stdout-path !\n");
 		return -ENODEV;
 	}
 	prom_stdout = of_find_node_by_path(name);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc: Look for "stdout-path" when setting up legacy consoles
  2018-11-30  3:54 [PATCH] powerpc: Look for "stdout-path" when setting up legacy consoles Benjamin Herrenschmidt
@ 2018-11-30 13:12 ` Rob Herring
  2018-12-02 11:02 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2018-11-30 13:12 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Thu, Nov 29, 2018 at 9:54 PM Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
>
> Commit 78e5dfea8 "powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'"
> broke the default console on a number of embedded PowerPC systems, because it
> failed to also update the code in arch/powerpc/kernel/legacy_serial.c to
> look for that property in addition to the old one.
>
> This fixes it.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Fixes: 78e5dfea8 powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: powerpc: Look for "stdout-path" when setting up legacy consoles
  2018-11-30  3:54 [PATCH] powerpc: Look for "stdout-path" when setting up legacy consoles Benjamin Herrenschmidt
  2018-11-30 13:12 ` Rob Herring
@ 2018-12-02 11:02 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2018-12-02 11:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev; +Cc: Rob Herring

On Fri, 2018-11-30 at 03:54:09 UTC, Benjamin Herrenschmidt wrote:
> Commit 78e5dfea8 "powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'"
> broke the default console on a number of embedded PowerPC systems, because it
> failed to also update the code in arch/powerpc/kernel/legacy_serial.c to
> look for that property in addition to the old one.
> 
> This fixes it.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Fixes: 78e5dfea8 powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'
> Reviewed-by: Rob Herring <robh@kernel.org>

Applied to powerpc fixes, thanks.

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

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-02 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30  3:54 [PATCH] powerpc: Look for "stdout-path" when setting up legacy consoles Benjamin Herrenschmidt
2018-11-30 13:12 ` Rob Herring
2018-12-02 11:02 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).