Browse Source

ARM: meson: serial: use meson_uart_tx_empty() to wait for empty

Use the meson_uart_tx_empty() instead of a direct read of the status
register. This is easier to read and will ensure the UART's transmit
state machine is idle when trying to update the baud rate.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Tested-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Dooks 9 years ago
parent
commit
f1f5c1400f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/tty/serial/meson_uart.c

+ 1 - 1
drivers/tty/serial/meson_uart.c

@@ -285,7 +285,7 @@ static void meson_uart_change_speed(struct uart_port *port, unsigned long baud)
 {
 	u32 val;
 
-	while (!(readl(port->membase + AML_UART_STATUS) & AML_UART_TX_EMPTY))
+	while (!meson_uart_tx_empty(port))
 		cpu_relax();
 
 	val = readl(port->membase + AML_UART_REG5);