serial: cadence: fix serial_flush
PATCH 1/1 serial: cadence: fix serial_flush
The TXEMPTY bit gets set as soon as the transmit FIFO gets empty, so flushing must wait until the bit is set instead of being unset.
Signed-off-by Lucas Stach <[email protected]>
--- drivers/serial/serial_cadence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/serial_cadence.c +1 -1
@@ -199,7 +199,7 @@ static void cadence_serial_flush(struct console_device *cdev) struct cadence_serial_priv, cdev);while ((readl (priv->regs +CADENCE_UART_CHANNEL_STS ) & -CADENCE_STS_TEMPTY ) !=0 ) +CADENCE_STS_TEMPTY ) ==0 ) ; }
Signature · 7 lines
2.23.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 7 lines · Lucas Stach
The TXEMPTY bit gets set as soon as the transmit FIFO gets empty, so flushing must wait until the bit is set instead of being unset.
Signed-off-by Lucas Stach <[email protected]>--- drivers/serial/serial_cadence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox