aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorachingupta <achin.gupta@arm.com>2014-06-12 09:15:06 +0100
committerachingupta <achin.gupta@arm.com>2014-06-12 09:15:06 +0100
commit2966dc2cf5919310fa95c6c12d0d4a7cfab10fdc (patch)
tree0aacecd4c872d955a65a45e03c694f63bd1b9c51
parentca1e6b63c4cc78bbad6ff89f8d7461446a785fa7 (diff)
parentd831af90a3788c705bfdd49c9f9548b34a647f80 (diff)
downloadarm-trusted-firmware-2966dc2cf5919310fa95c6c12d0d4a7cfab10fdc.tar.gz
Merge pull request #127 from sandrine-bailleux/sb/fix-pl011-fifo-polling
PL011: Fix a bug in the UART FIFO polling
-rw-r--r--drivers/arm/pl011/pl011_console.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/arm/pl011/pl011_console.c b/drivers/arm/pl011/pl011_console.c
index 0e82aa2..a26c00e 100644
--- a/drivers/arm/pl011/pl011_console.c
+++ b/drivers/arm/pl011/pl011_console.c
@@ -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);