[PATCH v4 1/2] serial: mxc: Wait for TX completion before reset
sbabic at denx.de
sbabic at denx.de
Tue Jan 31 10:51:21 CET 2023
> The u-boot console may show some corrupted characters when
> printing in board_init() due to reset or baudrate change
> of the UART (probe) before the TX FIFO has been completely
> drained.
> To fix this issue, and in case UART is still running, we now
> try to flush the FIFO before proceeding to UART reinitialization.
> For this we're waiting for Transmitter Complete bit, indicating
> that the FIFO and the shift register are empty.
> flushing has a 4ms timeout guard, which is normally more than
> enough to consume the FIFO @ low baudrate (9600bps).
> Signed-off-by: Loic Poulain <loic.poulain at linaro.org>
> Tested-by: Lothar Waßmann <LW at KARO-electronics.de>
> Acked-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Fabio Estevam <festevam at denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list