All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: sbabic@denx.de
Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, tharvey@gateworks.com,
	johannes.schneider@leica-geosystems.com,
	Fabio Estevam <festevam@denx.de>
Subject: [PATCH] Revert "serial: mxc: have putc use the TXFIFO"
Date: Tue,  8 Nov 2022 08:39:33 -0300	[thread overview]
Message-ID: <20221108113933.1437745-1-festevam@gmail.com> (raw)

From: Fabio Estevam <festevam@denx.de>

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.

Reported-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 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 4cf79c1ca24f..82c0d84628d5 100644
--- 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_TXEMPTY))
 		return -EAGAIN;
 
 	writel(ch, &uart->txd);
-- 
2.25.1


             reply	other threads:[~2022-11-08 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 11:39 Fabio Estevam [this message]
2022-11-10 17:58 ` [PATCH] Revert "serial: mxc: have putc use the TXFIFO" Tim Harvey
2022-11-12 16:26 ` sbabic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221108113933.1437745-1-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=festevam@denx.de \
    --cc=johannes.schneider@leica-geosystems.com \
    --cc=sbabic@denx.de \
    --cc=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.