lib: serial: fix RX path in litex-uart
authorGabriel Somlo <gsomlo@gmail.com>
Fri, 7 Jun 2024 18:23:42 +0000 (14:23 -0400)
committerAnup Patel <anup@brainfault.org>
Thu, 13 Jun 2024 16:24:09 +0000 (21:54 +0530)
commit7830e987856eb1319c82664702892b6d50a93e7a
treea192505c877efa7d518087bfda43cedfef88c64d
parent62e178a0a7b989d7cab9b2d4e33b291bc9a58c65
lib: serial: fix RX path in litex-uart

When used to read characters from the terminal (e.g., when the SBI
console is used via ecall from linux with `console=hvc0`), we must
acknowledge receipt of each character to "pop" it off the LiteUART
hardware queue, and allow the next character to be made available.

Fixes: 52af6e4b ("lib: utils: Add LiteX UART support")
Suggested-by: Dolu1990 <charles.papon.90@gmail.com>
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/utils/serial/litex-uart.c