Skip to contentSkip to conversation

Revert "serial: mxc: have putc use the TXFIFO"

PATCH In review Fabio Estevam 3 participants 3 messages Nov 8, 2022 – Nov 12, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "serial: mxc: have putc use the TXFIFO"

From: Fabio Estevam <[email protected]>

This reverts commit c7878a0483c59c48a730123bc0f4659fd40921bf.

Since commit c7878a0483c5 ("serial: mxc: have putc use the TXFIFO"), serial console corruption can be seen when priting inside board_init().

Revert it to avoid the regression.

---
 drivers/serial/serial_mxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/serial_mxc.c +1 -1
index 4cf79c1ca24f..82c0d84628d5 100644
@@ -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_TXEMPTY))
 		return -EAGAIN;
 
 	writel(ch, &uart->txd);
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 30 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

This reverts commit c7878a0483c59c48a730123bc0f4659fd40921bf.

Since commit c7878a0483c5 ("serial: mxc: have putc use the TXFIFO"), serial console corruption can be seen when priting inside board_init().

Revert it to avoid the regression.

---
 drivers/serial/serial_mxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/serial_mxc.c +1 -2
index 4cf79c1ca24f..82c0d84628d5 100644
@@ -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_TXEMPTY))
                return -EAGAIN;
 
        writel(ch, &uart->txd);
--
Quoted 2 lines

2.25.1

Fabio,

Thanks - yes please let's get this revert in.

Tim

#2 lore raw

PATCH 1/1 Revert "serial: mxc: have putc use the TXFIFO"

In reply to Fabio Estevam
Quoted 8 lines

From: Fabio Estevam <[email protected]>
This reverts commit c7878a0483c59c48a730123bc0f4659fd40921bf. Since commit c7878a0483c5 ("serial: mxc: have putc use the TXFIFO"), serial console corruption can be seen when priting inside board_init(). Revert it to avoid the regression.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================