Commit 7e6507ad authored by Jayachandran C's avatar Jayachandran C Committed by Ralf Baechle

MIPS: Netlogic: early console fix

In prom_putchar(), wait for just the TX empty bit to clear in the
UART LSR.
Signed-off-by: default avatarJayachandran C <jayachandranc@netlogicmicro.com>
Cc: linux-mips@linux-mips.org
Cc: Florian Fainelli <florian@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/4112/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 93a02932
...@@ -54,7 +54,7 @@ void prom_putchar(char c) ...@@ -54,7 +54,7 @@ void prom_putchar(char c)
#elif defined(CONFIG_CPU_XLR) #elif defined(CONFIG_CPU_XLR)
uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET); uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET);
#endif #endif
while (nlm_read_reg(uartbase, UART_LSR) == 0) while ((nlm_read_reg(uartbase, UART_LSR) & UART_LSR_THRE) == 0)
; ;
nlm_write_reg(uartbase, UART_TX, c); nlm_write_reg(uartbase, UART_TX, c);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment