diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-11-29 22:54:09 -0500 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-11-30 22:37:36 -0500 |
| commit | bf3d6afbb234156749b640b6c50f714967a85964 (patch) | |
| tree | 2c80fc83f2703a936479bac2910e4d56cd1f5aed | |
| parent | 78e7b15e17ac175e7eed9e21c6f92d03d3b0a6fa (diff) | |
powerpc: Look for "stdout-path" when setting up legacy consoles
Commit 78e5dfea84dc ("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.
Fixes: 78e5dfea84dc ("powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'")
Cc: stable@vger.kernel.org # v4.17+
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
| -rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 33b34a58fc62..5b9dce17f0c9 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) | |||
| 372 | 372 | ||
| 373 | /* Now find out if one of these is out firmware console */ | 373 | /* Now find out if one of these is out firmware console */ |
| 374 | path = of_get_property(of_chosen, "linux,stdout-path", NULL); | 374 | path = of_get_property(of_chosen, "linux,stdout-path", NULL); |
| 375 | if (path == NULL) | ||
| 376 | path = of_get_property(of_chosen, "stdout-path", NULL); | ||
| 375 | if (path != NULL) { | 377 | if (path != NULL) { |
| 376 | stdout = of_find_node_by_path(path); | 378 | stdout = of_find_node_by_path(path); |
| 377 | if (stdout) | 379 | if (stdout) |
| @@ -595,8 +597,10 @@ static int __init check_legacy_serial_console(void) | |||
| 595 | /* We are getting a weird phandle from OF ... */ | 597 | /* We are getting a weird phandle from OF ... */ |
| 596 | /* ... So use the full path instead */ | 598 | /* ... So use the full path instead */ |
| 597 | name = of_get_property(of_chosen, "linux,stdout-path", NULL); | 599 | name = of_get_property(of_chosen, "linux,stdout-path", NULL); |
| 600 | if (name == NULL) | ||
| 601 | name = of_get_property(of_chosen, "stdout-path", NULL); | ||
| 598 | if (name == NULL) { | 602 | if (name == NULL) { |
| 599 | DBG(" no linux,stdout-path !\n"); | 603 | DBG(" no stdout-path !\n"); |
| 600 | return -ENODEV; | 604 | return -ENODEV; |
| 601 | } | 605 | } |
| 602 | prom_stdout = of_find_node_by_path(name); | 606 | prom_stdout = of_find_node_by_path(name); |
