diff options
Diffstat (limited to 'src/drivers/uart')
-rw-r--r-- | src/drivers/uart/Kconfig | 4 | ||||
-rw-r--r-- | src/drivers/uart/uart8250io.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/drivers/uart/Kconfig b/src/drivers/uart/Kconfig index 4faa48d9f0..dafdff12de 100644 --- a/src/drivers/uart/Kconfig +++ b/src/drivers/uart/Kconfig @@ -9,6 +9,10 @@ config DRIVERS_UART_8250IO default n if NO_UART_ON_SUPERIO default y if ARCH_X86 +config DRIVERS_UART_8250IO_SKIP_INIT + def_bool n + depends on DRIVERS_UART_8250IO + # Select this for mainboard without SuperIO serial port. config NO_UART_ON_SUPERIO def_bool n diff --git a/src/drivers/uart/uart8250io.c b/src/drivers/uart/uart8250io.c index 89c447658a..ac3315a421 100644 --- a/src/drivers/uart/uart8250io.c +++ b/src/drivers/uart/uart8250io.c @@ -104,10 +104,12 @@ uintptr_t uart_platform_base(int idx) void uart_init(int idx) { - unsigned int div; - div = uart_baudrate_divisor(default_baudrate(), uart_platform_refclk(), - uart_input_clock_divider()); - uart8250_init(uart_platform_base(idx), div); + if (!IS_ENABLED(CONFIG_DRIVERS_UART_8250IO_SKIP_INIT)) { + unsigned int div; + div = uart_baudrate_divisor(default_baudrate(), + uart_platform_refclk(), uart_input_clock_divider()); + uart8250_init(uart_platform_base(idx), div); + } } void uart_tx_byte(int idx, unsigned char data) |