summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJingchang Lu <b35083@freescale.com>2012-08-14 16:02:02 +0800
committerJustin Waters <justin.waters@timesys.com>2012-09-12 16:50:08 -0400
commit7535a20e4ea8d18b1f37f3cf5063573e0718f026 (patch)
tree7a94cff9391af7478473dc6597f213d348cf536f /drivers
parent5d16debe12e62f7497466851f81f177fc8700a13 (diff)
ENGR00220352: Fix reboot hung after set uart baudrate3.0-mvf-201208141602
Signed-off-by: Jingchang Lu <b35083@freescale.com>
Diffstat (limited to 'drivers')
-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;