All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: mxs-auart: fix the wrong setting order
@ 2012-09-07  2:38 ` Huang Shijie
  0 siblings, 0 replies; 26+ messages in thread
From: Huang Shijie @ 2012-09-07  2:38 UTC (permalink / raw)
  To: gregkh
  Cc: alan, linux-serial, linux-kernel, shawn.guo, linux-arm-kernel,
	Huang Shijie

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>
---
 drivers/tty/serial/mxs-auart.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index dafeef2..ea5f888 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -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);
 }
 
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2012-09-13  5:45 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-07  2:38 [PATCH 1/2] serial: mxs-auart: fix the wrong setting order Huang Shijie
2012-09-07  2:38 ` Huang Shijie
2012-09-07  2:38 ` [PATCH 2/2] serial: mxs-auart: put the device in mxs_auart_probe() Huang Shijie
2012-09-07  2:38   ` Huang Shijie
2012-09-07  2:43   ` Shawn Guo
2012-09-07  2:43     ` Shawn Guo
2012-09-07  2:33     ` [PATCH] serial: mxs-auart: put the device when exit or error Huang Shijie
2012-09-07  2:33       ` Huang Shijie
2012-09-07  2:33       ` Huang Shijie
2012-09-07  3:14       ` Shawn Guo
2012-09-07  3:14         ` Shawn Guo
2012-09-10 23:00       ` Greg KH
2012-09-10 23:00         ` Greg KH
2012-09-11  7:30         ` [PATCH] serial: mxs-auart: put the device in the error path Huang Shijie
2012-09-07  2:48     ` [PATCH 2/2] serial: mxs-auart: put the device in mxs_auart_probe() Huang Shijie
2012-09-07  2:48       ` Huang Shijie
2012-09-07  2:48       ` Huang Shijie
2012-09-07  2:38 ` [PATCH 1/2] serial: mxs-auart: fix the wrong setting order Shawn Guo
2012-09-07  2:38   ` Shawn Guo
2012-09-07  2:43   ` Huang Shijie
2012-09-07  2:43     ` Huang Shijie
2012-09-07  2:43     ` Huang Shijie
2012-09-13  5:28     ` Lauri Hintsala
2012-09-13  5:28       ` Lauri Hintsala
2012-09-13  5:45       ` Huang Shijie
2012-09-13  5:45         ` Huang Shijie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.