[PATCH v5 2/2] serial: mxc: have putc use the TXFIFO

Peng Fan peng.fan at oss.nxp.com
Wed Oct 26 12:10:17 CEST 2022


Hi Fabio

On 10/26/2022 6:19 AM, Fabio Estevam wrote:
> 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))

This may bring the issue that Johannes met back

Regards,
Peng.

>                  return -EAGAIN;
> 
>          writel(ch, &uart->txd);


More information about the U-Boot mailing list