From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH 2/2] OMAP: DMA: clear interrupt status correctly Date: Wed, 05 Jan 2011 09:27:27 -0800 Message-ID: <87mxnfz2f4.fsf@ti.com> References: <20101130132341.13286.25157.sendpatchset@ahunter-work.research.nokia.com> <20101130132355.13286.77389.sendpatchset@ahunter-work.research.nokia.com> <541b3a50479779f3e814aa93d506cbdd@mail.gmail.com> <20101221202914.GK5829@atomide.com> <4D2440E0.7040008@nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]:47211 "EHLO na3sys009aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751369Ab1AER1e (ORCPT ); Wed, 5 Jan 2011 12:27:34 -0500 Received: by gxk20 with SMTP id 20so6636935gxk.6 for ; Wed, 05 Jan 2011 09:27:33 -0800 (PST) In-Reply-To: <4D2440E0.7040008@nokia.com> (Adrian Hunter's message of "Wed, 05 Jan 2011 11:58:56 +0200") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Adrian Hunter Cc: Tony Lindgren , Santosh Shilimkar , Manjunath Kondaiah G , linux-omap Mailing List Adrian Hunter writes: > From fffa19df17d73c1ed2e8c65c0b6604ee1dddff84 Mon Sep 17 00:00:00 2001 > From: Adrian Hunter > Date: Wed, 24 Nov 2010 13:23:21 +0200 > Subject: [PATCH] OMAP: DMA: clear interrupt status correctly > > When clearing the DMA channel, clear all status bits. > > When handling a DMA interrupt, clear only the interrupt > status bits that have been read and are passed to the > channel's interrupt handler, not every status bit. > > Signed-off-by: Adrian Hunter > Acked-by: Santosh Shilimkar Looks like a fix that should go into 2.6.38-rc2. Can you repost and Cc linux-arm-kernel as well? Thanks, Kevin > --- > arch/arm/plat-omap/dma.c | 7 +++---- > 1 files changed, 3 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c > index c4b2b47..8536308 100644 > --- a/arch/arm/plat-omap/dma.c > +++ b/arch/arm/plat-omap/dma.c > @@ -53,7 +53,7 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED }; > #endif > #define OMAP_DMA_ACTIVE 0x01 > -#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe > +#define OMAP2_DMA_CSR_CLEAR_MASK 0xffffffff > #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) > @@ -1873,7 +1873,7 @@ static int omap2_dma_handle_ch(int ch) > printk(KERN_INFO "DMA misaligned error with device %d\n", > dma_chan[ch].dev_id); > - p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, ch); > + p->dma_write(status, CSR, ch); > p->dma_write(1 << ch, IRQSTATUS_L0, ch); > /* read back the register to flush the write */ > p->dma_read(IRQSTATUS_L0, ch); > @@ -1893,10 +1893,9 @@ static int omap2_dma_handle_ch(int ch) > OMAP_DMA_CHAIN_INCQHEAD(chain_id); > status = p->dma_read(CSR, ch); > + p->dma_write(status, CSR, ch); > } > - p->dma_write(status, CSR, ch); > - > if (likely(dma_chan[ch].callback != NULL)) > dma_chan[ch].callback(ch, status, dma_chan[ch].data); > -- > 1.7.0.4 > -- > 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