Commit bf07c9f2 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Kevin Hilman

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: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent cb0cb2b8
......@@ -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);
}
/*----------------------------------------------------------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment