]> 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)
commit33ec806f908b912cd02ff40ed6b97fde73339b02
tree07f205fe60f4d5fe5a69a5406789e7510effd20f
parentf4c383cc6cbcfd8ac82b3464dc4edccc9a81404e
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