From: Aaro Koskinen Date: Wed, 20 May 2009 13:58:30 +0000 (+0300) Subject: OMAP: PM: Clear DMA channel state after a wakeup X-Git-Tag: v2.6.33-rc1~381^2~69^2~1^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf07c9f2d869077cc918b4cda861eadac6df6283;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 1b5216f..8836da3 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); } /*----------------------------------------------------------------------------*/