summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/mvf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/mvf.c b/drivers/tty/serial/mvf.c
index bd5643b90300..13aa8a9eef8a 100644
--- a/drivers/tty/serial/mvf.c
+++ b/drivers/tty/serial/mvf.c
@@ -751,13 +751,14 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
*/
uart_update_timeout(port, termios->c_cflag, baud);
- /* disable transmit and receive first */
- writeb(old_cr2 & ~(MXC_UARTCR2_TE | MXC_UARTCR2_RE),
- sport->port.membase + MXC_UARTCR2);
/* wait transmit engin complete */
while (!(readb(sport->port.membase + MXC_UARTSR1) & MXC_UARTSR1_TC))
barrier();
+ /* disable transmit and receive */
+ writeb(old_cr2 & ~(MXC_UARTCR2_TE | MXC_UARTCR2_RE),
+ sport->port.membase + MXC_UARTCR2);
+
sbr = sport->port.uartclk / (16 * baud);
brfa = ((sport->port.uartclk - (16 * sbr * baud)) * 2)/baud;