[PATCH 4/5] serial: ns16550: Add support for SPL_DEBUG_UART_BASE

Stefan Roese sr at denx.de
Mon May 16 08:38:20 CEST 2022


On 06.05.22 11:05, Pali Rohár wrote:
> 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 at kernel.org>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   drivers/serial/ns16550.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
> index a4220fd0ae2f..78bfe6281ce3 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

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list