diff options
Diffstat (limited to 'drivers/tty/serial/earlycon.c')
| -rw-r--r-- | drivers/tty/serial/earlycon.c | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index c3651540e1ba..98928f082d87 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c @@ -220,7 +220,7 @@ static int __init param_setup_earlycon(char *buf)  		if (IS_ENABLED(CONFIG_ACPI_SPCR_TABLE)) {  			earlycon_init_is_deferred = true;  			return 0; -		} else { +		} else if (!buf) {  			return early_init_dt_scan_chosen_stdout();  		}  	} @@ -282,7 +282,12 @@ int __init of_setup_earlycon(const struct earlycon_id *match,  		}  	} +	val = of_get_flat_dt_prop(node, "current-speed", NULL); +	if (val) +		early_console_dev.baud = be32_to_cpu(*val); +  	if (options) { +		early_console_dev.baud = simple_strtoul(options, NULL, 0);  		strlcpy(early_console_dev.options, options,  			sizeof(early_console_dev.options));  	}  | 
