From 4d118c9a866590850dad8689262a95345d2c6e09 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Sat, 16 Jan 2016 15:23:42 -0800 Subject: 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 Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/earlycon.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers/tty/serial/earlycon.c') 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) -- cgit v1.2.1