aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-11-27 12:56:07 -0500
committerGrant Likely <grant.likely@linaro.org>2014-12-03 18:12:37 -0500
commit7914a7c5651a51617d952e8fa745000ed8c4f001 (patch)
tree4a0b5a33bd0dbc2a39bcec49ccc3dc7f9c412d91
parent75c28c09af99a0db0ccd8b4395469761aa736543 (diff)
of: support passing console options with stdout-path
Support specifying console options (like with console=ttyXN,<options>) by appending them to the stdout-path property after a separating ':'. Example: stdout-path = "uart0:115200"; Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> [grant.likely: minor rework to shorten the diffstat] Signed-off-by: Grant Likely <grant.likely@linaro.org>
-rw-r--r--drivers/of/base.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index bdf051d0a7e6..f2be7c860cf2 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -37,6 +37,7 @@ EXPORT_SYMBOL(of_root);
37struct device_node *of_chosen; 37struct device_node *of_chosen;
38struct device_node *of_aliases; 38struct device_node *of_aliases;
39struct device_node *of_stdout; 39struct device_node *of_stdout;
40static const char *of_stdout_options;
40 41
41struct kset *of_kset; 42struct kset *of_kset;
42 43
@@ -1852,7 +1853,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
1852 if (IS_ENABLED(CONFIG_PPC) && !name) 1853 if (IS_ENABLED(CONFIG_PPC) && !name)
1853 name = of_get_property(of_aliases, "stdout", NULL); 1854 name = of_get_property(of_aliases, "stdout", NULL);
1854 if (name) 1855 if (name)
1855 of_stdout = of_find_node_by_path(name); 1856 of_stdout = of_find_node_opts_by_path(name, &of_stdout_options);
1856 } 1857 }
1857 1858
1858 if (!of_aliases) 1859 if (!of_aliases)
@@ -1978,7 +1979,8 @@ bool of_console_check(struct device_node *dn, char *name, int index)
1978{ 1979{
1979 if (!dn || dn != of_stdout || console_set_on_cmdline) 1980 if (!dn || dn != of_stdout || console_set_on_cmdline)
1980 return false; 1981 return false;
1981 return !add_preferred_console(name, index, NULL); 1982 return !add_preferred_console(name, index,
1983 kstrdup(of_stdout_options, GFP_KERNEL));
1982} 1984}
1983EXPORT_SYMBOL_GPL(of_console_check); 1985EXPORT_SYMBOL_GPL(of_console_check);
1984 1986