dmaengine: dw: Reset DRAIN bit when resume the channel
For Intel iDMA 32-bit the channel can be drained on a suspend. We need to reset the bit on the resume to return a status quo. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
committed by
Vinod Koul
parent
69da8be90d
commit
91f0ff883e
@@ -35,6 +35,13 @@ static void dw_dma_suspend_chan(struct dw_dma_chan *dwc, bool drain)
|
||||
channel_writel(dwc, CFG_LO, cfglo | DWC_CFGL_CH_SUSP);
|
||||
}
|
||||
|
||||
static void dw_dma_resume_chan(struct dw_dma_chan *dwc, bool drain)
|
||||
{
|
||||
u32 cfglo = channel_readl(dwc, CFG_LO);
|
||||
|
||||
channel_writel(dwc, CFG_LO, cfglo & ~DWC_CFGL_CH_SUSP);
|
||||
}
|
||||
|
||||
static u32 dw_dma_bytes2block(struct dw_dma_chan *dwc,
|
||||
size_t bytes, unsigned int width, size_t *len)
|
||||
{
|
||||
@@ -91,6 +98,7 @@ int dw_dma_probe(struct dw_dma_chip *chip)
|
||||
/* Channel operations */
|
||||
dw->initialize_chan = dw_dma_initialize_chan;
|
||||
dw->suspend_chan = dw_dma_suspend_chan;
|
||||
dw->resume_chan = dw_dma_resume_chan;
|
||||
dw->encode_maxburst = dw_dma_encode_maxburst;
|
||||
dw->bytes2block = dw_dma_bytes2block;
|
||||
dw->block2bytes = dw_dma_block2bytes;
|
||||
|
||||
Reference in New Issue
Block a user