mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
drivers/char: Check if console=dtuart for ACPI SPCR serial bring up
dtuart denotes a generic UART parsed from a device tree (back then it was the only method, hence dt prefix) or ACPI SPCR table (they all use the SERHND_DTUART serial handle). Currently we only check if console= is set to dtuart in the DT flow and not in the ACPI flow. This means that even if we set console=none we would still bring up ACPI parsed serial device for nothing. Move the check to uart_init() to cover both paths. Signed-off-by: Michal Orzel <michal.orzel@amd.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
422484e55c
commit
12b136a965
1 file changed
+3
-3
@@ -38,9 +38,6 @@ static void __init dt_uart_init(void)
|
||||
const char *options;
|
||||
char *split;
|
||||
|
||||
if ( !console_has("dtuart") )
|
||||
return; /* Not for us */
|
||||
|
||||
if ( !strcmp(opt_dtuart, "") )
|
||||
{
|
||||
const struct dt_device_node *chosen = dt_find_node_by_path("/chosen");
|
||||
@@ -121,6 +118,9 @@ static void __init acpi_uart_init(void) { }
|
||||
|
||||
void __init uart_init(void)
|
||||
{
|
||||
if ( !console_has("dtuart") )
|
||||
return; /* Not for us */
|
||||
|
||||
if ( acpi_disabled )
|
||||
dt_uart_init();
|
||||
else
|
||||
|
||||