Before attempting to write a character, the PL011 driver polls
the PL011_UARTFR_TXFF bit to know whether the UART FIFO is full.
However, the comparison with 1 was incorrect because
PL011_UARTFR_TXFF is not at bit 0. This patch fixes it.
Change-Id: If78892345bbdc8a5e4ae4a1b7159753c609681b0
}
-#define WAIT_UNTIL_UART_FREE(base) while ((pl011_read_fr(base)\
- & PL011_UARTFR_TXFF) == 1)
+#define WAIT_UNTIL_UART_FREE(base) \
+ while ((pl011_read_fr(base) & PL011_UARTFR_TXFF)) \
+ continue
+
int console_putc(int c)
{
assert(uart_base);