aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2014-11-27 17:56:07 +0000
committerAlex Shi <alex.shi@linaro.org>2015-12-16 15:29:19 +0800
commit5ca64887e2e56cebb64e32d5832db032bb305b59 (patch)
treef5124873d968f77253e5947865cb1031a9dd6018
parente617a457c099bbfa4020f2dbdf640f4199a660dd (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> (cherry picked from commit 7914a7c5651a51617d952e8fa745000ed8c4f001) Signed-off-by: Alex Shi <alex.shi@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 6a7c76acd484..ab0271199f93 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -37,6 +37,7 @@ EXPORT_SYMBOL(of_root);
struct device_node *of_chosen;
struct device_node *of_aliases;
struct device_node *of_stdout;
+static const char *of_stdout_options;
struct kset *of_kset;
@@ -1885,7 +1886,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
if (IS_ENABLED(CONFIG_PPC) && !name)
name = of_get_property(of_aliases, "stdout", NULL);
if (name)
- of_stdout = of_find_node_by_path(name);
+ of_stdout = of_find_node_opts_by_path(name, &of_stdout_options);
}
if (!of_aliases)
@@ -2011,7 +2012,8 @@ bool of_console_check(struct device_node *dn, char *name, int index)
{
if (!dn || dn != of_stdout || console_set_on_cmdline)
return false;
- return !add_preferred_console(name, index, NULL);
+ return !add_preferred_console(name, index,
+ kstrdup(of_stdout_options, GFP_KERNEL));
}
EXPORT_SYMBOL_GPL(of_console_check);