Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Peter Hurley and committed by
Rob Herring
2fa645cb 2c192699

+3 -1
+3 -1
drivers/of/base.c
··· 1886 1886 name = of_get_property(of_chosen, "linux,stdout-path", NULL); 1887 1887 if (IS_ENABLED(CONFIG_PPC) && !name) 1888 1888 name = of_get_property(of_aliases, "stdout", NULL); 1889 - if (name) 1889 + if (name) { 1890 1890 of_stdout = of_find_node_opts_by_path(name, &of_stdout_options); 1891 + add_preferred_console("stdout-path", 0, NULL); 1892 + } 1891 1893 } 1892 1894 1893 1895 if (!of_aliases)