[PATCH 1/2] driver/serial: auart: fix flush

Marc Kleine-Budde mkl at pengutronix.de
Thu Mar 14 13:31:52 EDT 2013


Actually wait until fifo is empty.

Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 drivers/serial/serial_auart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/serial_auart.c b/drivers/serial/serial_auart.c
index fa2e04f..1aebb07 100644
--- a/drivers/serial/serial_auart.c
+++ b/drivers/serial/serial_auart.c
@@ -129,7 +129,7 @@ static void auart_serial_flush(struct console_device *cdev)
 	struct auart_priv *priv = container_of(cdev, struct auart_priv, cdev);
 
 	/* Wait for TX FIFO empty */
-	while (readl(priv->base + HW_UARTAPP_STAT) & BM_UARTAPP_STAT_TXFE)
+	while (!(readl(priv->base + HW_UARTAPP_STAT) & BM_UARTAPP_STAT_TXFE))
 		;
 }
 
-- 
1.8.2.rc2




More information about the barebox mailing list