summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2009-05-20 16:58:30 +0300
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-11 14:42:26 -0800
commitbf07c9f2d869077cc918b4cda861eadac6df6283 (patch)
tree2c79b779097afae9d091c1ccb7176046181e01cc /arch/arm/plat-omap
parentcb0cb2b815bf073dc0211ab224682a6caf6c89ce (diff)
downloadblackbird-obmc-linux-bf07c9f2d869077cc918b4cda861eadac6df6283.tar.gz
blackbird-obmc-linux-bf07c9f2d869077cc918b4cda861eadac6df6283.zip
OMAP: PM: Clear DMA channel state after a wakeup
Clear DMA channel states so that users can assume a known initial state. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/dma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 1b5216f1e78d..8836da32d63b 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2358,6 +2358,8 @@ void omap_dma_global_context_save(void)
void omap_dma_global_context_restore(void)
{
+ int ch;
+
dma_write(omap_dma_global_context.dma_gcr, GCR);
dma_write(omap_dma_global_context.dma_ocp_sysconfig,
OCP_SYSCONFIG);
@@ -2372,6 +2374,10 @@ void omap_dma_global_context_restore(void)
*/
if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
dma_write(0x3 , IRQSTATUS_L0);
+
+ for (ch = 0; ch < dma_chan_count; ch++)
+ if (dma_chan[ch].dev_id != -1)
+ omap_clear_dma(ch);
}
/*----------------------------------------------------------------------------*/
OpenPOWER on IntegriCloud