[PATCH v5 2/2] serial: mxc: have putc use the TXFIFO
Fabio Estevam
festevam at denx.de
Wed Oct 26 00:19:01 CEST 2022
Hi Tim,
On 25/10/2022 18:37, Tim Harvey wrote:
> Fabio and Pali,
>
> Seems reasonable but this does not resolve the problem. Whatever I
> print in board_init gets cutoff by the print from dm_announce.
Should we check for both TXFULL and TXEMPTY conditions?
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -311,7 +311,7 @@ static int mxc_serial_putc(struct udevice *dev,
const char ch)
struct mxc_serial_plat *plat = dev_get_plat(dev);
struct mxc_uart *const uart = plat->reg;
- if (readl(&uart->ts) & UTS_TXFULL)
+ if ((readl(&uart->ts) & UTS_TXFULL) || !(readl(&uart->ts) &
UTS_TXEMPTY))
return -EAGAIN;
writel(ch, &uart->txd);
More information about the U-Boot
mailing list