diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-09-23 14:18:12 (GMT) |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-10-15 15:01:04 (GMT) |
commit | 7a83c045435e896db6c689145d752d28b8b99b7b (patch) | |
tree | 19b94720aa378b763c8dd273cb870e292e6117c6 | |
parent | 3d588f83e4d6a5230d9094b97d38621cbaa9a972 (diff) | |
download | linux-7a83c045435e896db6c689145d752d28b8b99b7b.tar.xz |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/dw/core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index 9546b1f..e94de00 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -1470,6 +1470,11 @@ static void dw_dma_off(struct dw_dma *dw) 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) { struct dw_dma *dw; @@ -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_issue_pending = dwc_issue_pending; - dma_writel(dw, CFG, DW_CFG_DMA_EN); + dw_dma_on(dw); err = dma_async_device_register(&dw->dma); if (err) @@ -1705,7 +1710,7 @@ int dw_dma_resume(struct dw_dma_chip *chip) { struct dw_dma *dw = chip->dw; - dma_writel(dw, CFG, DW_CFG_DMA_EN); + dw_dma_on(dw); return 0; } EXPORT_SYMBOL_GPL(dw_dma_resume); |