Commit 7a83c045 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Vinod Koul

dmaengine: dw: introduce dw_dma_on() helper

As an opposite to dw_dma_off() let's introduce dw_dma_on() helper. It will be
useful later as well.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 3d588f83
...@@ -1470,6 +1470,11 @@ static void dw_dma_off(struct dw_dma *dw) ...@@ -1470,6 +1470,11 @@ static void dw_dma_off(struct dw_dma *dw)
dw->chan[i].initialized = false; dw->chan[i].initialized = false;
} }
static void dw_dma_on(struct dw_dma *dw)
{
dma_writel(dw, CFG, DW_CFG_DMA_EN);
}
int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata) int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
{ {
struct dw_dma *dw; struct dw_dma *dw;
...@@ -1643,7 +1648,7 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata) ...@@ -1643,7 +1648,7 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
dw->dma.device_tx_status = dwc_tx_status; dw->dma.device_tx_status = dwc_tx_status;
dw->dma.device_issue_pending = dwc_issue_pending; dw->dma.device_issue_pending = dwc_issue_pending;
dma_writel(dw, CFG, DW_CFG_DMA_EN); dw_dma_on(dw);
err = dma_async_device_register(&dw->dma); err = dma_async_device_register(&dw->dma);
if (err) if (err)
...@@ -1705,7 +1710,7 @@ int dw_dma_resume(struct dw_dma_chip *chip) ...@@ -1705,7 +1710,7 @@ int dw_dma_resume(struct dw_dma_chip *chip)
{ {
struct dw_dma *dw = chip->dw; struct dw_dma *dw = chip->dw;
dma_writel(dw, CFG, DW_CFG_DMA_EN); dw_dma_on(dw);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(dw_dma_resume); EXPORT_SYMBOL_GPL(dw_dma_resume);
......
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