Skip to contentSkip to conversation

serial: cadence: fix serial_flush

PATCH Applied Lucas Stach 2 participants 2 messages Nov 1, 2019 – Nov 4, 2019

lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/serial/serial_cadence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/serial_cadence.c +1 -1
index 0501c400b129..6454888e3c5b 100644
@@ -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
Applied
#1 lore raw
Quoted 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.

---
 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