public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] Revert "serial: mxc: have putc use the TXFIFO"
@ 2022-11-08 11:39 Fabio Estevam
  2022-11-10 17:58 ` Tim Harvey
  2022-11-12 16:26 ` sbabic
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2022-11-08 11:39 UTC (permalink / raw)
  To: sbabic; +Cc: u-boot, uboot-imx, tharvey, johannes.schneider, Fabio Estevam

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "serial: mxc: have putc use the TXFIFO"
  2022-11-08 11:39 [PATCH] Revert "serial: mxc: have putc use the TXFIFO" Fabio Estevam
@ 2022-11-10 17:58 ` Tim Harvey
  2022-11-12 16:26 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: Tim Harvey @ 2022-11-10 17:58 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: sbabic, u-boot, uboot-imx, johannes.schneider, Fabio Estevam

On Tue, Nov 8, 2022 at 3:39 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> 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
>

Fabio,

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

Acked-by: Tim Harvey <tharvey@gateworks.com>

Tim

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Revert "serial: mxc: have putc use the TXFIFO"
  2022-11-08 11:39 [PATCH] Revert "serial: mxc: have putc use the TXFIFO" Fabio Estevam
  2022-11-10 17:58 ` Tim Harvey
@ 2022-11-12 16:26 ` sbabic
  1 sibling, 0 replies; 3+ messages in thread
From: sbabic @ 2022-11-12 16:26 UTC (permalink / raw)
  To: Fabio Estevam, u-boot

> 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>
> Acked-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-12 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-08 11:39 [PATCH] Revert "serial: mxc: have putc use the TXFIFO" Fabio Estevam
2022-11-10 17:58 ` Tim Harvey
2022-11-12 16:26 ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox