From patchwork Thu Sep 20 08:51:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1483351 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 1F9ED3FE65 for ; Thu, 20 Sep 2012 08:54:54 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TEcVF-0004lM-2Z; Thu, 20 Sep 2012 08:52:57 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TEcUh-0004dn-2u for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 08:52:24 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAN00CU64MYFC50@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 17:52:22 +0900 (KST) X-AuditID: cbfee61a-b7f726d000000ec7-b8-505ad9456705 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id FA.9E.03783.549DA505; Thu, 20 Sep 2012 17:52:21 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAN001S64MRTC90@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 20 Sep 2012 17:52:21 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/6] pinctrl: exynos: Handle only unmasked wakeup interrupts Date: Thu, 20 Sep 2012 10:51:41 +0200 Message-id: <1348131104-24828-4-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1348131104-24828-1-git-send-email-t.figa@samsung.com> References: <1348131104-24828-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQV3Xm1EBBvtuWVtsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6MKw3XmQsWcFcs7tjA2MB4nrOLkYNDQsBE4tq1qC5GTiBTTOLC vfVsXYxcHEIC0xklfrW8YYRwNjNJvN37kRGkik1ATeJzwyM2EFtEQENiStdjdpAiZoF9jBJT L+1mAUkIC/hI/F5/gRnEZhFQleg/MoEJxOYVcJK49XYlK8Q6eYmn9/vABnEKOEucetAJVi8E VDP38mq2CYy8CxgZVjGKphYkFxQnpeca6hUn5haX5qXrJefnbmIE+/yZ1A7GlQ0WhxgFOBiV eHgbl0cFCLEmlhVX5h5ilOBgVhLh3TgRKMSbklhZlVqUH19UmpNafIhRmoNFSZxX+FNggJBA emJJanZqakFqEUyWiYNTqoHR/8jEqz7CLh1Lrv6qv+uX8G7Xmb+3386t3boi5prwA+O0LxXy 380W2d5kvnq9JeNAveDXo9V5EmWLYqbcOZ6ru5P3TNwLi/eMxddjRHoeT2UWtBf+UZObLPpg 9pSQ2GOvHZfE/BKV373pROHD1UEpE/7NrFyu7726d8X23lVz7WXSO2+l7pqkqMRSnJFoqMVc VJwIAHeAGD/1AQAA X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.4 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, linus.walleij@linaro.org, kyungmin.park@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.abraham@linaro.org, t.figa@samsung.com, m.szyprowski@samsung.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 A bit in EINTxx_PEND register is set regardless of interrupt mask, which causes spurious interrupts. To avoid them, the read value of pending register must be masked with current interrupt mask manually. Signed-off-by: Tomasz Figa Signed-off-by: Kyungmin Park --- drivers/pinctrl/pinctrl-exynos.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 46cd637..5648971 100644 --- a/drivers/pinctrl/pinctrl-exynos.c +++ b/drivers/pinctrl/pinctrl-exynos.c @@ -395,12 +395,15 @@ static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) struct exynos_weint_data *eintd = irq_get_handler_data(irq); struct samsung_pinctrl_drv_data *d = eintd->domain->host_data; unsigned long pend; + unsigned long mask; chained_irq_enter(chip, desc); pend = readl(d->virt_base + d->ctrl->weint_pend + 0x8); - exynos_irq_demux_eint(16, pend, eintd->domain); + mask = readl(d->virt_base + d->ctrl->weint_mask + 0x8); + exynos_irq_demux_eint(16, pend & ~mask, eintd->domain); pend = readl(d->virt_base + d->ctrl->weint_pend + 0xC); - exynos_irq_demux_eint(24, pend, eintd->domain); + mask = readl(d->virt_base + d->ctrl->weint_mask + 0xC); + exynos_irq_demux_eint(24, pend & ~mask, eintd->domain); chained_irq_exit(chip, desc); }