From patchwork Fri Sep 7 02:38:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 1415191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 9E7243FC71 for ; Thu, 6 Sep 2012 14:39:50 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9dCQ-0008R4-Qx; Thu, 06 Sep 2012 14:36:55 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T9dCN-0008Q5-Jg for linux-arm-kernel@lists.infradead.org; Thu, 06 Sep 2012 14:36:52 +0000 Received: by pbbrq8 with SMTP id rq8so2648303pbb.36 for ; Thu, 06 Sep 2012 07:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=AqxF8KRRhrEtw0TR2G9ruMSLRm7yBpiGY1O1isFv5Q8=; b=aOlgFFUTERbHcAxGzRQkkyE793CU1I4zU+8OzIdW3KsbLyoOPuU4B2suYlgduzDrcI eeVGWi9TYasApNshv8ez+LcVp49UjmwCIZPXaEGBFxHParRwy6VucHAigfB1eOPFq0+v 777dyipobzHSXr1vb+j+nZaQMztfUh7nEBWJ6n2CEy5ME6JFqa4LSZlQ5SzrfORNA8ma bd7KYupqt+j69IFaZ483WfoWJLxkHkoucyqvoUuHuFr7UNUZGbGGHllEZvOURgE3GS/y 0/2UPSq3A9zDYNkuZw2vTtpz++dCgNOle1UAiO08LrLfJ3pH2JJmpG0AYReTKeC5QLW1 rz9A== Received: by 10.66.75.229 with SMTP id f5mr3651521paw.47.1346942209732; Thu, 06 Sep 2012 07:36:49 -0700 (PDT) Received: from localhost.localdomain.Home ([218.81.144.166]) by mx.google.com with ESMTPS id ty1sm1426851pbc.76.2012.09.06.07.36.45 (version=SSLv3 cipher=OTHER); Thu, 06 Sep 2012 07:36:48 -0700 (PDT) From: Huang Shijie To: gregkh@linuxfoundation.org Subject: [PATCH 1/2] serial: mxs-auart: fix the wrong setting order Date: Thu, 6 Sep 2012 22:38:40 -0400 Message-Id: <1346985521-2248-1-git-send-email-shijie8@gmail.com> X-Mailer: git-send-email 1.7.4.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shijie8[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 3.2 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (shijie8[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, shawn.guo@linaro.org, Huang Shijie , linux-arm-kernel@lists.infradead.org, alan@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Acked-by: Shawn Guo --- 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); }