Commit c6af727f authored by Sandrine Bailleux's avatar Sandrine Bailleux
Browse files

PL011: Fix a bug in the UART FIFO polling

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: I4b53c28612f58581c6189ed6c794ed02cc2a89e3
parent de116940
......@@ -65,8 +65,10 @@ void console_init(unsigned long base_addr)
}
#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);
......
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