]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine/dw_dmac: Reconfigure interrupt and chan_cfg register on resume
authorViresh Kumar <viresh.kumar@st.com>
Thu, 17 Nov 2011 10:31:29 +0000 (16:01 +0530)
committerVinod Koul <vinod.koul@linux.intel.com>
Mon, 28 Nov 2011 03:18:02 +0000 (08:48 +0530)
commit3a63b7d48d97d1bf2421de19a5f37f12b8734e7f
tree07f205fe60f4d5fe5a69a5406789e7510effd20f
parent59196a68c9a82862e848f83c4647007a8a3a3029
dmaengine/dw_dmac: Reconfigure interrupt and chan_cfg register on resume

In S2R all DMA registers are reset by hardware and thus they are required to be
reprogrammed. The channels which aren't reprogrammed are channel configuration
and interrupt enable registers, which are currently programmed at chan_alloc
time.

This patch creates another routine to initialize a channel. It will try to
initialize channel on every dwc_dostart() call. If channel is already
initialised then it simply returns, otherwise it configures registers.

This routine will also initialize registers on wakeup from S2R, as we mark
channels as uninitialized on suspend.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/dw_dmac.c
drivers/dma/dw_dmac_regs.h