Wait until fifo is empty, not until fifo is not full. Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> --- drivers/serial/stm-serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/serial/stm-serial.c b/drivers/serial/stm-serial.c index 3968892..e1276bd 100644 --- a/drivers/serial/stm-serial.c +++ b/drivers/serial/stm-serial.c @@ -34,6 +34,7 @@ #define UARTDBGDR 0x00 #define UARTDBGFR 0x18 +# define TXFE (1 << 7) # define TXFF (1 << 5) # define RXFE (1 << 4) #define UARTDBGIBRD 0x24 @@ -92,7 +93,7 @@ static void stm_serial_flush(struct console_device *cdev) struct stm_priv *priv = container_of(cdev, struct stm_priv, cdev); /* Wait for TX FIFO empty */ - while (readl(priv->base + UARTDBGFR) & TXFF) + while (!(readl(priv->base + UARTDBGFR) & TXFE)) ; } -- 1.8.2.rc2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox