summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/earlycon.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-16 15:23:42 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-06 22:07:37 -0800
commit4d118c9a866590850dad8689262a95345d2c6e09 (patch)
treea5667d9441ff995380c4fc1bbda65e1d7bf5f1e7 /drivers/tty/serial/earlycon.c
parent05d961320ba624c98b16d72b32f947307674b341 (diff)
of: earlycon: Add options string handling
Pass-through any options string in the 'stdout-path' property to the earlycon "driver" setup. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/earlycon.c')
-rw-r--r--drivers/tty/serial/earlycon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 47e54deb944b..7509ee34de28 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -218,7 +218,8 @@ early_param("earlycon", param_setup_earlycon);
#ifdef CONFIG_OF_EARLY_FLATTREE
int __init of_setup_earlycon(unsigned long addr,
- const struct earlycon_id *match)
+ const struct earlycon_id *match,
+ const char *options)
{
int err;
struct uart_port *port = &early_console_dev.port;
@@ -229,8 +230,12 @@ int __init of_setup_earlycon(unsigned long addr,
port->uartclk = BASE_BAUD * 16;
port->membase = earlycon_map(addr, SZ_4K);
+ if (options) {
+ strlcpy(early_console_dev.options, options,
+ sizeof(early_console_dev.options));
+ }
earlycon_init(&early_console_dev, match->name);
- err = match->setup(&early_console_dev, NULL);
+ err = match->setup(&early_console_dev, options);
if (err < 0)
return err;
if (!early_console_dev.con->write)