From patchwork Wed Mar 4 21:54:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 9934 X-Patchwork-Delegate: tony@atomide.com 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 n24Lt4GE031710 for ; Wed, 4 Mar 2009 21:55:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754812AbZCDVzA (ORCPT ); Wed, 4 Mar 2009 16:55:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751956AbZCDVzA (ORCPT ); Wed, 4 Mar 2009 16:55:00 -0500 Received: from mho-01-bos.mailhop.org ([63.208.196.178]:60970 "EHLO mho-01-bos.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754812AbZCDVy7 (ORCPT ); Wed, 4 Mar 2009 16:54:59 -0500 Received: from c-69-181-40-92.hsd1.ca.comcast.net ([69.181.40.92] helo=[127.0.0.1]) by mho-01-bos.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1Lez3J-000CXR-DT; Wed, 04 Mar 2009 21:54:57 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 69.181.40.92 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/s6nPbnjrB+pVnfWOJLdHh Subject: [PATCH 6/7] ARM: OMAP: Dispatch only relevant DMA interrupts To: linux-arm-kernel@lists.arm.linux.org.uk From: Tony Lindgren Cc: Nishant Kamat , linux-omap@vger.kernel.org, Santosh Shilimkar Date: Wed, 04 Mar 2009 13:54:55 -0800 Message-ID: <20090304215455.21101.47444.stgit@localhost> In-Reply-To: <20090304214540.21101.72079.stgit@localhost> References: <20090304214540.21101.72079.stgit@localhost> User-Agent: StGit/0.14.3.343.g0584 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Santosh Shilimkar This fixes the spurious interrupt issue on a DMA channel. In OMAP sDMA, contrast to the SDMA.DMA4_CSRi registers, the SDMA.DMA4_IRQSTATUS_Lj registers are updated regardless of the corresponding bits in the SDMA.DMA4_IRQENABLE_Lj registers. Since there are four sDMA interrupt lines and if more than one line is actively used by two concurrently running sDMA softwares modules,then the spurious interrupt can be observed on the other lines. Fix in this patch will only dispatch the relevant and enabled interrupts on a particular line thus perevting spurious IRQ. Signed-off-by: Santosh Shilimkar Acked-by: Nishant Kamat Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dma.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index eca43bb..c46e5a4 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1901,7 +1901,7 @@ static int omap2_dma_handle_ch(int ch) /* STATUS register count is from 1-32 while our is 0-31 */ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id) { - u32 val; + u32 val, enable_reg; int i; val = dma_read(IRQSTATUS_L0); @@ -1910,6 +1910,8 @@ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id) printk(KERN_WARNING "Spurious DMA IRQ\n"); return IRQ_HANDLED; } + enable_reg = dma_read(IRQENABLE_L0); + val &= enable_reg; /* Dispatch only relevant interrupts */ for (i = 0; i < dma_lch_count && val != 0; i++) { if (val & 1) omap2_dma_handle_ch(i);