serial: pl011: Resend the character if FIFO is full in debug uart
PATCH v2 1/1 serial: pl011: Resend the character if FIFO is full in debug uart
pl01x_putc() might return -EAGAIN if there was no space in FIFO. In that case, high-level caller should wait until there is space and resend the character.
Signed-off-by Chen Baozi <[email protected]>
Reviewed-by Stefan Roese <[email protected]>
--- drivers/serial/serial_pl01x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/serial/serial_pl01x.c +2 -1
@@ -417,7 +417,8 @@ static inline void _debug_uart_putc(int ch) {struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE ; -pl01x_putc (regs, ch); +while (pl01x_putc (regs, ch) == -EAGAIN ) + ; }DEBUG_UART_FUNCS
Signature · 1 line
2.28.0
Quoted 10 lines · Chen Baozi
pl01x_putc()might return-EAGAINif there was no space in FIFO. In that case, high-level caller should wait until there is space and resend the character.Signed-off-by Chen Baozi <[email protected]>Reviewed-by Stefan Roese <[email protected]>--- drivers/serial/serial_pl01x.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by Simon Glass <[email protected]>
Quoted 7 lines · Chen Baozi
pl01x_putc()might return-EAGAINif there was no space in FIFO. In that case, high-level caller should wait until there is space and resend the character.Signed-off-by Chen Baozi <[email protected]>Reviewed-by Stefan Roese <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom