aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2015-11-18 09:41:16 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-13 22:59:48 -0500
commitf1f5c1400f7907a1b52be94cabe8992b480785cf (patch)
treedee699e1aa353ee661731d6c2221a34b0cc98f0e /drivers/tty
parent855ddcab352c15b8c4d0bd93759f821250c601fb (diff)
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/meson_uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 9327efd88918..d3f2c967906c 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -285,7 +285,7 @@ static void meson_uart_change_speed(struct uart_port *port, unsigned long baud)
285{ 285{
286 u32 val; 286 u32 val;
287 287
288 while (!(readl(port->membase + AML_UART_STATUS) & AML_UART_TX_EMPTY)) 288 while (!meson_uart_tx_empty(port))
289 cpu_relax(); 289 cpu_relax();
290 290
291 val = readl(port->membase + AML_UART_REG5); 291 val = readl(port->membase + AML_UART_REG5);