mirror of https://gitee.com/openkylin/linux.git
powerpc: Look for "stdout-path" when setting up legacy consoles
Commit78e5dfea84
("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:78e5dfea84
("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>
This commit is contained in:
parent
78e7b15e17
commit
bf3d6afbb2
|
@ -372,6 +372,8 @@ void __init find_legacy_serial_ports(void)
|
||||||
|
|
||||||
/* Now find out if one of these is out firmware console */
|
/* Now find out if one of these is out firmware console */
|
||||||
path = of_get_property(of_chosen, "linux,stdout-path", NULL);
|
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) {
|
if (path != NULL) {
|
||||||
stdout = of_find_node_by_path(path);
|
stdout = of_find_node_by_path(path);
|
||||||
if (stdout)
|
if (stdout)
|
||||||
|
@ -595,8 +597,10 @@ static int __init check_legacy_serial_console(void)
|
||||||
/* We are getting a weird phandle from OF ... */
|
/* We are getting a weird phandle from OF ... */
|
||||||
/* ... So use the full path instead */
|
/* ... So use the full path instead */
|
||||||
name = of_get_property(of_chosen, "linux,stdout-path", NULL);
|
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) {
|
if (name == NULL) {
|
||||||
DBG(" no linux,stdout-path !\n");
|
DBG(" no stdout-path !\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
prom_stdout = of_find_node_by_path(name);
|
prom_stdout = of_find_node_by_path(name);
|
||||||
|
|
Loading…
Reference in New Issue