提交 f1f5c140 编写于 作者: B Ben Dooks 提交者: Greg Kroah-Hartman

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: NBen Dooks <ben.dooks@codethink.co.uk>
Tested-by: NCarlo Caione <carlo@endlessm.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 855ddcab
...@@ -285,7 +285,7 @@ static void meson_uart_change_speed(struct uart_port *port, unsigned long baud) ...@@ -285,7 +285,7 @@ static void meson_uart_change_speed(struct uart_port *port, unsigned long baud)
{ {
u32 val; u32 val;
while (!(readl(port->membase + AML_UART_STATUS) & AML_UART_TX_EMPTY)) while (!meson_uart_tx_empty(port))
cpu_relax(); cpu_relax();
val = readl(port->membase + AML_UART_REG5); val = readl(port->membase + AML_UART_REG5);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册