diff options
Diffstat (limited to 'drivers/tty/serial/earlycon.c')
-rw-r--r-- | drivers/tty/serial/earlycon.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index 4c8b80f1c688..870e84fb6e39 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c | |||
@@ -197,25 +197,20 @@ int __init setup_earlycon(char *buf) | |||
197 | } | 197 | } |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * When CONFIG_ACPI_SPCR_TABLE is defined, "earlycon" without parameters in | 200 | * This defers the initialization of the early console until after ACPI has |
201 | * command line does not start DT earlycon immediately, instead it defers | 201 | * been initialized. |
202 | * starting it until DT/ACPI decision is made. At that time if ACPI is enabled | ||
203 | * call parse_spcr(), else call early_init_dt_scan_chosen_stdout() | ||
204 | */ | 202 | */ |
205 | bool earlycon_init_is_deferred __initdata; | 203 | bool earlycon_acpi_spcr_enable __initdata; |
206 | 204 | ||
207 | /* early_param wrapper for setup_earlycon() */ | 205 | /* early_param wrapper for setup_earlycon() */ |
208 | static int __init param_setup_earlycon(char *buf) | 206 | static int __init param_setup_earlycon(char *buf) |
209 | { | 207 | { |
210 | int err; | 208 | int err; |
211 | 209 | ||
212 | /* | 210 | /* Just 'earlycon' is a valid param for devicetree and ACPI SPCR. */ |
213 | * Just 'earlycon' is a valid param for devicetree earlycons; | ||
214 | * don't generate a warning from parse_early_params() in that case | ||
215 | */ | ||
216 | if (!buf || !buf[0]) { | 211 | if (!buf || !buf[0]) { |
217 | if (IS_ENABLED(CONFIG_ACPI_SPCR_TABLE)) { | 212 | if (IS_ENABLED(CONFIG_ACPI_SPCR_TABLE)) { |
218 | earlycon_init_is_deferred = true; | 213 | earlycon_acpi_spcr_enable = true; |
219 | return 0; | 214 | return 0; |
220 | } else if (!buf) { | 215 | } else if (!buf) { |
221 | return early_init_dt_scan_chosen_stdout(); | 216 | return early_init_dt_scan_chosen_stdout(); |