]> git.karo-electronics.de Git - linux-beck.git/commitdiff
MIPS: Netlogic: early console fix
authorJayachandran C <jayachandranc@netlogicmicro.com>
Mon, 16 Jul 2012 10:03:37 +0000 (15:33 +0530)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 24 Jul 2012 16:24:44 +0000 (18:24 +0200)
In prom_putchar(), wait for just the TX empty bit to clear in the
UART LSR.

Signed-off-by: Jayachandran 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: Ralf Baechle <ralf@linux-mips.org>
arch/mips/netlogic/common/earlycons.c

index f193f7b3bd81ce15b23c80fb6acce438be838649..1902fa22d277dc2cdd8ccd1ccad583a71d8cdc7a 100644 (file)
@@ -54,7 +54,7 @@ void prom_putchar(char c)
 #elif defined(CONFIG_CPU_XLR)
        uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET);
 #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);
 }