From patchwork Wed Feb 4 09:12:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 5361 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 n149CjDV013874 for ; Wed, 4 Feb 2009 09:12:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753229AbZBDJMn (ORCPT ); Wed, 4 Feb 2009 04:12:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753059AbZBDJMn (ORCPT ); Wed, 4 Feb 2009 04:12:43 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:48546 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752645AbZBDJMk convert rfc822-to-8bit (ORCPT ); Wed, 4 Feb 2009 04:12:40 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n149CWnk000475; Wed, 4 Feb 2009 03:12:38 -0600 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id n149CVmA000867; Wed, 4 Feb 2009 14:42:31 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde71.ent.ti.com ([172.24.170.149]) with mapi; Wed, 4 Feb 2009 14:42:31 +0530 From: "Shilimkar, Santosh" To: Tony Lindgren CC: "linux-omap@vger.kernel.org" Date: Wed, 4 Feb 2009 14:42:30 +0530 Subject: [PATCH] OMAP: sDMA: DMA : DMA spurious IRQ in shared usage Thread-Topic: [PATCH] OMAP: sDMA: DMA : DMA spurious IRQ in shared usage Thread-Index: AcmGqLTq/AVA0d/aQHO2zpDfQXKSOA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Tony, Here is the second patch which fixes the spurious irq issue on sDMA when used by two software modules with independent interrupt lines. 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 cc: Tony Lindgren --- arch/arm/plat-omap/dma.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Regards, Santosh -- 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 Index: omapkernel/arch/arm/plat-omap/dma.c =================================================================== --- omapkernel.orig/arch/arm/plat-omap/dma.c 2009-02-04 13:07:51.000000000 +0530 +++ omapkernel/arch/arm/plat-omap/dma.c 2009-02-04 14:00:38.709913959 +0530 @@ -1954,7 +1954,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); @@ -1963,6 +1963,8 @@ static irqreturn_t omap2_dma_irq_handler 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);