aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2009-05-20 09:58:30 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-11 17:42:26 -0500
commitbf07c9f2d869077cc918b4cda861eadac6df6283 (patch)
tree2c79b779097afae9d091c1ccb7176046181e01cc
parentcb0cb2b815bf073dc0211ab224682a6caf6c89ce (diff)
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>
-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)
2358 2358
2359void omap_dma_global_context_restore(void) 2359void omap_dma_global_context_restore(void)
2360{ 2360{
2361 int ch;
2362
2361 dma_write(omap_dma_global_context.dma_gcr, GCR); 2363 dma_write(omap_dma_global_context.dma_gcr, GCR);
2362 dma_write(omap_dma_global_context.dma_ocp_sysconfig, 2364 dma_write(omap_dma_global_context.dma_ocp_sysconfig,
2363 OCP_SYSCONFIG); 2365 OCP_SYSCONFIG);
@@ -2372,6 +2374,10 @@ void omap_dma_global_context_restore(void)
2372 */ 2374 */
2373 if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP)) 2375 if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
2374 dma_write(0x3 , IRQSTATUS_L0); 2376 dma_write(0x3 , IRQSTATUS_L0);
2377
2378 for (ch = 0; ch < dma_chan_count; ch++)
2379 if (dma_chan[ch].dev_id != -1)
2380 omap_clear_dma(ch);
2375} 2381}
2376 2382
2377/*----------------------------------------------------------------------------*/ 2383/*----------------------------------------------------------------------------*/