aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-06-18 05:15:38 -0400
committerVinod Koul <vinod.koul@intel.com>2014-07-15 12:44:30 -0400
commitdd8ecfcac66b4485416b2d1df0ec4798b198d7d6 (patch)
tree60a91f6fa94271e0a9ca229494793bd3407249f4 /drivers/dma
parentcba15617c37cc6082c286c2a272202565f62e7bc (diff)
dmaengine: dw: don't perform DMA when dmaengine_submit is called
Accordingly to discussion [1] and followed up documentation the DMA controller driver shouldn't start any DMA operations when dmaengine_submit() is called. This patch fixes the workflow in dw_dmac driver to follow the documentation. [1] http://www.spinics.net/lists/arm-kernel/msg125987.html Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/TODO1
-rw-r--r--drivers/dma/dw/core.c19
2 files changed, 7 insertions, 13 deletions
diff --git a/drivers/dma/TODO b/drivers/dma/TODO
index 734ed0206cd5..b8045cd42ee1 100644
--- a/drivers/dma/TODO
+++ b/drivers/dma/TODO
@@ -7,7 +7,6 @@ TODO for slave dma
7 - imx-dma 7 - imx-dma
8 - imx-sdma 8 - imx-sdma
9 - mxs-dma.c 9 - mxs-dma.c
10 - dw_dmac
11 - intel_mid_dma 10 - intel_mid_dma
124. Check other subsystems for dma drivers and merge/move to dmaengine 114. Check other subsystems for dma drivers and merge/move to dmaengine
135. Remove dma_slave_config's dma direction. 125. Remove dma_slave_config's dma direction.
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 52815b905b7c..1af731b83b3f 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -684,17 +684,9 @@ static dma_cookie_t dwc_tx_submit(struct dma_async_tx_descriptor *tx)
684 * possible, perhaps even appending to those already submitted 684 * possible, perhaps even appending to those already submitted
685 * for DMA. But this is hard to do in a race-free manner. 685 * for DMA. But this is hard to do in a race-free manner.
686 */ 686 */
687 if (list_empty(&dwc->active_list)) {
688 dev_vdbg(chan2dev(tx->chan), "%s: started %u\n", __func__,
689 desc->txd.cookie);
690 list_add_tail(&desc->desc_node, &dwc->active_list);
691 dwc_dostart(dwc, dwc_first_active(dwc));
692 } else {
693 dev_vdbg(chan2dev(tx->chan), "%s: queued %u\n", __func__,
694 desc->txd.cookie);
695 687
696 list_add_tail(&desc->desc_node, &dwc->queue); 688 dev_vdbg(chan2dev(tx->chan), "%s: queued %u\n", __func__, desc->txd.cookie);
697 } 689 list_add_tail(&desc->desc_node, &dwc->queue);
698 690
699 spin_unlock_irqrestore(&dwc->lock, flags); 691 spin_unlock_irqrestore(&dwc->lock, flags);
700 692
@@ -1099,9 +1091,12 @@ dwc_tx_status(struct dma_chan *chan,
1099static void dwc_issue_pending(struct dma_chan *chan) 1091static void dwc_issue_pending(struct dma_chan *chan)
1100{ 1092{
1101 struct dw_dma_chan *dwc = to_dw_dma_chan(chan); 1093 struct dw_dma_chan *dwc = to_dw_dma_chan(chan);
1094 unsigned long flags;
1102 1095
1103 if (!list_empty(&dwc->queue)) 1096 spin_lock_irqsave(&dwc->lock, flags);
1104 dwc_scan_descriptors(to_dw_dma(chan->device), dwc); 1097 if (list_empty(&dwc->active_list))
1098 dwc_dostart_first_queued(dwc);
1099 spin_unlock_irqrestore(&dwc->lock, flags);
1105} 1100}
1106 1101
1107static int dwc_alloc_chan_resources(struct dma_chan *chan) 1102static int dwc_alloc_chan_resources(struct dma_chan *chan)