Skip to content

Commit

Permalink
serial: mxs-auart: fix the wrong setting order
Browse files Browse the repository at this point in the history
After set the AUART_CTRL0_CLKGATE, the UART will gate all the clocks off.
So the following line will not take effect.
       ................................................................
 	writel(AUART_INTR_RXIEN | AUART_INTR_RTIEN | AUART_INTR_CTSMIEN,
 			u->membase + AUART_INTR_CLR);
       ................................................................

To fix this issue, the patch moves this gate-off line to
the end of setting registers.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Huang Shijie authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 37cd0c9 commit 851b714
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/tty/serial/mxs-auart.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,11 @@ static void mxs_auart_shutdown(struct uart_port *u)

writel(AUART_CTRL2_UARTEN, u->membase + AUART_CTRL2_CLR);

writel(AUART_CTRL0_CLKGATE, u->membase + AUART_CTRL0_SET);

writel(AUART_INTR_RXIEN | AUART_INTR_RTIEN | AUART_INTR_CTSMIEN,
u->membase + AUART_INTR_CLR);

writel(AUART_CTRL0_CLKGATE, u->membase + AUART_CTRL0_SET);

clk_disable_unprepare(s->clk);
}

Expand Down

0 comments on commit 851b714

Please sign in to comment.