[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091022221136.27408.73433.stgit@localhost>
Date: Thu, 22 Oct 2009 15:11:37 -0700
From: Tony Lindgren <tony@...mide.com>
To: linux-arm-kernel@...ts.infradead.org
Cc: Venkatraman S <svenkatr@...com>, linux-kernel@...r.kernel.org,
Santosh Shilimkar <santosh.shilimkar@...com>,
Jarkko Nikula <jhnikula@...il.com>,
Hari n <hari.zoom@...il.com>, linux-omap@...r.kernel.org
Subject: [PATCH 02/10] omap: SDMA: Fix omap_stop_dma() API for channel linking
From: Santosh Shilimkar <santosh.shilimkar@...com>
OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used
in linking scenario.
The DMA channel needs to be disabled before resetting the chain.
Also fix clearing of the OMAP_DMA_ACTIVE status in the linked case.
Cc: Hari n <hari.zoom@...il.com>
Cc: Jarkko Nikula <jhnikula@...il.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@...com>
Signed-off-by: Venkatraman S <svenkatr@...com>
Signed-off-by: Tony Lindgren <tony@...mide.com>
---
arch/arm/plat-omap/dma.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 0eb676d..b53125f 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -978,6 +978,14 @@ void omap_stop_dma(int lch)
{
u32 l;
+ /* Disable all interrupts on the channel */
+ if (cpu_class_is_omap1())
+ dma_write(0, CICR(lch));
+
+ l = dma_read(CCR(lch));
+ l &= ~OMAP_DMA_CCR_EN;
+ dma_write(l, CCR(lch));
+
if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
int next_lch, cur_lch = lch;
char dma_chan_link_map[OMAP_DMA4_LOGICAL_DMA_CH_COUNT];
@@ -995,18 +1003,8 @@ void omap_stop_dma(int lch)
next_lch = dma_chan[cur_lch].next_lch;
cur_lch = next_lch;
} while (next_lch != -1);
-
- return;
}
- /* Disable all interrupts on the channel */
- if (cpu_class_is_omap1())
- dma_write(0, CICR(lch));
-
- l = dma_read(CCR(lch));
- l &= ~OMAP_DMA_CCR_EN;
- dma_write(l, CCR(lch));
-
dma_chan[lch].flags &= ~OMAP_DMA_ACTIVE;
}
EXPORT_SYMBOL(omap_stop_dma);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists