summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-05-06 11:05:16 +0200
committerStefan Roese <sr@denx.de>2022-05-17 06:44:06 +0200
commitd293759d55cce9c3efccf96ca8423008c9d0293b (patch)
tree6547670477b84267c6187cb5b1fb556836c35605 /drivers/serial
parent958789f026c23d9bfea9d31fe78745ef32b0bd7b (diff)
downloadu-boot-d293759d55cce9c3efccf96ca8423008c9d0293b.tar.gz
u-boot-d293759d55cce9c3efccf96ca8423008c9d0293b.tar.bz2
u-boot-d293759d55cce9c3efccf96ca8423008c9d0293b.zip
serial: ns16550: Add support for SPL_DEBUG_UART_BASE
Use CONFIG_VAL(DEBUG_UART_BASE) instead of CONFIG_DEBUG_UART_BASE, so proper config value (CONFIG_DEBUG_UART_BASE or CONFIG_SPL_DEBUG_UART_BASE) is used based on building target. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/ns16550.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index a4220fd0ae..78bfe6281c 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