diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/Kconfig | 40 | ||||
-rw-r--r-- | drivers/serial/ns16550.c | 4 |
2 files changed, 16 insertions, 28 deletions
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 26fa498bbbb..45c284a408d 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -84,36 +84,10 @@ config VPL_SERIAL_PRESENT This option enables the full UART in TPL, so if is it disabled, the full UART driver will be omitted, thus saving space. -# Logic to allow us to use the imply keyword to set what the default port -# should be. The default is otherwise 1. -config CONS_INDEX_0 - bool - -config CONS_INDEX_2 - bool - -config CONS_INDEX_3 - bool - -config CONS_INDEX_4 - bool - -config CONS_INDEX_5 - bool - -config CONS_INDEX_6 - bool - config CONS_INDEX int "UART used for console" depends on SPECIFY_CONSOLE_INDEX range 0 6 - default 0 if CONS_INDEX_0 - default 2 if CONS_INDEX_2 - default 3 if CONS_INDEX_3 - default 4 if CONS_INDEX_4 - default 5 if CONS_INDEX_5 - default 6 if CONS_INDEX_6 default 1 help Set this to match the UART number of the serial console. @@ -508,6 +482,20 @@ config DEBUG_UART_BASE A default should be provided by your board, but if not you will need to use the correct value here. +config SPL_DEBUG_UART_BASE + hex "Base address of UART for SPL" + depends on SPL && DEBUG_UART + default DEBUG_UART_BASE + help + This is the base address of your UART for memory-mapped UARTs for SPL. + +config TPL_DEBUG_UART_BASE + hex "Base address of UART for TPL" + depends on TPL && DEBUG_UART + default DEBUG_UART_BASE + help + This is the base address of your UART for memory-mapped UARTs for TPL. + config DEBUG_UART_CLOCK int "UART input clock" depends on DEBUG_UART diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index a4220fd0ae2..78bfe6281ce 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -325,7 +325,7 @@ int ns16550_tstc(struct ns16550 *com_port) static inline void _debug_uart_init(void) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; + struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); int baud_divisor; /* @@ -360,7 +360,7 @@ static inline int NS16550_read_baud_divisor(struct ns16550 *com_port) static inline void _debug_uart_putc(int ch) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; + struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) { #ifdef CONFIG_DEBUG_UART_NS16550_CHECK_ENABLED |