summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-03-01 17:21:22 (GMT)
committerRob Herring <robh@kernel.org>2015-03-10 15:27:21 (GMT)
commit2fa645cb2703d9b3786d850db815414dfeefa51d (patch)
tree66607f387502f0a31385873ae0812901e5e2b773
parent2c192699a7050ef5bdf1e2cc95fdddfbcf524509 (diff)
downloadlinux-2fa645cb2703d9b3786d850db815414dfeefa51d.tar.xz
of: Fix premature bootconsole disable with 'stdout-path'
Support for devicetree serial consoles via 'stdout-path' causes bootconsoles to be disabled when the vt dummy console loads, since there is no preferred console (the preferred console is not added until the device is probed). Ensure there is at least a preferred console, even if never matched. Requires: "console: Fix console name size mismatch" Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--drivers/of/base.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 0a8aeb8..3b1aa08 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1886,8 +1886,10 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
name = of_get_property(of_chosen, "linux,stdout-path", NULL);
if (IS_ENABLED(CONFIG_PPC) && !name)
name = of_get_property(of_aliases, "stdout", NULL);
- if (name)
+ if (name) {
of_stdout = of_find_node_opts_by_path(name, &of_stdout_options);
+ add_preferred_console("stdout-path", 0, NULL);
+ }
}
if (!of_aliases)