From patchwork Fri Apr 3 07:58:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 16046 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n33809Xk028874 for ; Fri, 3 Apr 2009 08:00:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759933AbZDCH7R (ORCPT ); Fri, 3 Apr 2009 03:59:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760133AbZDCH7R (ORCPT ); Fri, 3 Apr 2009 03:59:17 -0400 Received: from smtp.nokia.com ([192.100.122.230]:60902 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759522AbZDCH7P (ORCPT ); Fri, 3 Apr 2009 03:59:15 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx03.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n337wiNw002795; Fri, 3 Apr 2009 10:59:03 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 3 Apr 2009 10:58:59 +0300 Received: from mgw-int01.ntc.nokia.com ([172.21.143.96]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 3 Apr 2009 10:58:59 +0300 Received: from [172.21.35.172] (esdhcp035172.research.nokia.com [172.21.35.172]) by mgw-int01.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n337wvvd030856; Fri, 3 Apr 2009 10:58:57 +0300 Message-ID: <49D5C1A8.5090606@nokia.com> Date: Fri, 03 Apr 2009 10:58:32 +0300 From: Roger Quadros User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: ext Tony Lindgren CC: linux-omap@vger.kernel.org Subject: [PATCH] GPIO: OMAP: Fixed spurious IRQ issue for GPIO interrupts X-OriginalArrivalTime: 03 Apr 2009 07:58:59.0103 (UTC) FILETIME=[0B7F5AF0:01C9B432] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Roger Quadros Date: Fri, 3 Apr 2009 10:32:20 +0300 Subject: [PATCH] GPIO: OMAP: Fixed spurious IRQ issue for GPIO interrupts Flush posted write to IRQSTATUS register in GPIO IRQ handler. This eliminates the below error for all peripherals that use GPIO interrupts. <4>Spurious irq 95: 0xffffffdf, please flush posted write for irq 31 Signed-off-by: Roger Quadros --- arch/arm/plat-omap/gpio.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 210a1c0..17d7afe 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -758,8 +758,12 @@ static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask) /* Workaround for clearing DSP GPIO interrupts to allow retention */ #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) + reg = bank->base + OMAP24XX_GPIO_IRQSTATUS2; if (cpu_is_omap24xx() || cpu_is_omap34xx()) - __raw_writel(gpio_mask, bank->base + OMAP24XX_GPIO_IRQSTATUS2); + __raw_writel(gpio_mask, reg); + + /* Flush posted write for the irq status to avoid spurious interrupts */ + __raw_readl(reg); #endif }