mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00
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>
This commit is contained in:
parent
958789f026
commit
d293759d55
1 changed files with 2 additions and 2 deletions
|
@ -325,7 +325,7 @@ int ns16550_tstc(struct ns16550 *com_port)
|
||||||
|
|
||||||
static inline void _debug_uart_init(void)
|
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;
|
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)
|
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)) {
|
while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) {
|
||||||
#ifdef CONFIG_DEBUG_UART_NS16550_CHECK_ENABLED
|
#ifdef CONFIG_DEBUG_UART_NS16550_CHECK_ENABLED
|
||||||
|
|
Loading…
Add table
Reference in a new issue