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>
This commit is contained in:

committed by
Greg Kroah-Hartman

vanhempi
05d961320b
commit
4d118c9a86
@@ -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)
|
||||
|
Viittaa uudesa ongelmassa
Block a user