[PATCH v1 2/2] serial: mxc: have putc use the TXFIFO
Johannes Schneider
johannes.schneider at leica-geosystems.com
Mon Sep 5 10:54:00 CEST 2022
only waiting for TXEMPTY leads to corrupted messages going over the
wire - which is fixed by making use of the FIFO
Signed-off-by: Johannes Schneider <johannes.schneider at leica-geosystems.com>
---
drivers/serial/serial_mxc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 5f283cc635..1e0add7281 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -309,7 +309,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_TXEMPTY))
+ if (readl(&uart->ts) & UTS_TXFULL)
return -EAGAIN;
writel(ch, &uart->txd);
--
2.25.1
More information about the U-Boot
mailing list