summaryrefslogtreecommitdiff
path: root/src/drivers/uart/pl011.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/uart/pl011.c')
-rw-r--r--src/drivers/uart/pl011.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/drivers/uart/pl011.c b/src/drivers/uart/pl011.c
index 415dce13bc..9cb702f952 100644
--- a/src/drivers/uart/pl011.c
+++ b/src/drivers/uart/pl011.c
@@ -42,7 +42,11 @@ void uart_tx_flush(int idx)
unsigned char uart_rx_byte(int idx)
{
- return 0;
+ struct pl011_uart *regs = uart_platform_baseptr(idx);
+
+ while (read32(&regs->fr) & PL011_UARTFR_RXFE)
+ ;
+ return read8(&regs->dr);
}
#ifndef __PRE_RAM__