diff options
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/uart/Kconfig | 17 | ||||
-rw-r--r-- | src/drivers/uart/oxpcie_early.c | 5 | ||||
-rw-r--r-- | src/drivers/uart/pl011.c | 5 | ||||
-rw-r--r-- | src/drivers/uart/uart8250io.c | 5 | ||||
-rw-r--r-- | src/drivers/uart/uart8250mem.c | 5 |
5 files changed, 37 insertions, 0 deletions
diff --git a/src/drivers/uart/Kconfig b/src/drivers/uart/Kconfig index f4ad011933..ae3e81adb1 100644 --- a/src/drivers/uart/Kconfig +++ b/src/drivers/uart/Kconfig @@ -41,3 +41,20 @@ config DRIVERS_UART_PL011 bool default n select HAVE_UART_SPECIAL + +config UART_USE_REFCLK_AS_INPUT_CLOCK + bool + default n + help + Use uart_platform_refclk to specify the input clock value. + +config UART_PCI_ADDR + hex "UART's PCI bus, device, function address" + default 0 + help + Specify zero if the UART is connected to another bus type. + For PCI based UARTs, build the value as: + * 1 << 31 - Valid bit, PCI UART in use + * Bus << 20 + * Device << 15 + * Function << 12 diff --git a/src/drivers/uart/oxpcie_early.c b/src/drivers/uart/oxpcie_early.c index eb91d31154..6582a9e5ab 100644 --- a/src/drivers/uart/oxpcie_early.c +++ b/src/drivers/uart/oxpcie_early.c @@ -92,6 +92,11 @@ void uart_fill_lb(void *data) serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE); serial.baud = default_baudrate(); serial.regwidth = 1; + if (IS_ENABLED(CONFIG_UART_USE_REFCLK_AS_INPUT_CLOCK)) + serial.input_hertz = uart_platform_refclk(); + else + serial.input_hertz = 0; + serial.uart_pci_addr = CONFIG_UART_PCI_ADDR; lb_add_serial(&serial, data); lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data); diff --git a/src/drivers/uart/pl011.c b/src/drivers/uart/pl011.c index aa55c682a6..808cb46538 100644 --- a/src/drivers/uart/pl011.c +++ b/src/drivers/uart/pl011.c @@ -48,6 +48,11 @@ void uart_fill_lb(void *data) serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE); serial.baud = default_baudrate(); serial.regwidth = 1; + if (IS_ENABLED(CONFIG_UART_USE_REFCLK_AS_INPUT_CLOCK)) + serial.input_hertz = uart_platform_refclk(); + else + serial.input_hertz = 0; + serial.uart_pci_addr = CONFIG_UART_PCI_ADDR; lb_add_serial(&serial, data); lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data); diff --git a/src/drivers/uart/uart8250io.c b/src/drivers/uart/uart8250io.c index 63bc42fccc..0974005a81 100644 --- a/src/drivers/uart/uart8250io.c +++ b/src/drivers/uart/uart8250io.c @@ -139,6 +139,11 @@ void uart_fill_lb(void *data) serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE); serial.baud = default_baudrate(); serial.regwidth = 1; + if (IS_ENABLED(CONFIG_UART_USE_REFCLK_AS_INPUT_CLOCK)) + serial.input_hertz = uart_platform_refclk(); + else + serial.input_hertz = 0; + serial.uart_pci_addr = CONFIG_UART_PCI_ADDR; lb_add_serial(&serial, data); lb_add_console(LB_TAG_CONSOLE_SERIAL8250, data); diff --git a/src/drivers/uart/uart8250mem.c b/src/drivers/uart/uart8250mem.c index 278ddb8ebb..2f2bd2df56 100644 --- a/src/drivers/uart/uart8250mem.c +++ b/src/drivers/uart/uart8250mem.c @@ -156,6 +156,11 @@ void uart_fill_lb(void *data) serial.regwidth = sizeof(uint32_t); else serial.regwidth = sizeof(uint8_t); + if (IS_ENABLED(CONFIG_UART_USE_REFCLK_AS_INPUT_CLOCK)) + serial.input_hertz = uart_platform_refclk(); + else + serial.input_hertz = 0; + serial.uart_pci_addr = CONFIG_UART_PCI_ADDR; lb_add_serial(&serial, data); lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data); |