drivers/uart/pl011.c Add read support

Implement uart_rx_byte

Change-Id: I5a33b3cd4b333fb244bc55747014a301021e25e0
Signed-off-by: Marcello Sylvester Bauer <info@marcellobauer.com>
Reviewed-on: https://review.coreboot.org/25623
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Marcello Sylvester Bauer 2018-04-11 15:55:02 +02:00 committed by Martin Roth
parent 0af272c1a9
commit 24231893d6
1 changed files with 5 additions and 1 deletions

View File

@ -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__