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:
parent
0af272c1a9
commit
24231893d6
|
@ -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(®s->fr) & PL011_UARTFR_RXFE)
|
||||
;
|
||||
return read8(®s->dr);
|
||||
}
|
||||
|
||||
#ifndef __PRE_RAM__
|
||||
|
|
Loading…
Reference in New Issue