aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r--drivers/dma/dw_dmac.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 0e4b5c6a2f86..5bd23006ff4a 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -249,7 +249,7 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc,
249 dev_vdbg(chan2dev(&dwc->chan), "descriptor %u complete\n", txd->cookie); 249 dev_vdbg(chan2dev(&dwc->chan), "descriptor %u complete\n", txd->cookie);
250 250
251 spin_lock_irqsave(&dwc->lock, flags); 251 spin_lock_irqsave(&dwc->lock, flags);
252 dwc->completed = txd->cookie; 252 dwc->chan.completed_cookie = txd->cookie;
253 if (callback_required) { 253 if (callback_required) {
254 callback = txd->callback; 254 callback = txd->callback;
255 param = txd->callback_param; 255 param = txd->callback_param;
@@ -997,14 +997,14 @@ dwc_tx_status(struct dma_chan *chan,
997 dma_cookie_t last_complete; 997 dma_cookie_t last_complete;
998 int ret; 998 int ret;
999 999
1000 last_complete = dwc->completed; 1000 last_complete = chan->completed_cookie;
1001 last_used = chan->cookie; 1001 last_used = chan->cookie;
1002 1002
1003 ret = dma_async_is_complete(cookie, last_complete, last_used); 1003 ret = dma_async_is_complete(cookie, last_complete, last_used);
1004 if (ret != DMA_SUCCESS) { 1004 if (ret != DMA_SUCCESS) {
1005 dwc_scan_descriptors(to_dw_dma(chan->device), dwc); 1005 dwc_scan_descriptors(to_dw_dma(chan->device), dwc);
1006 1006
1007 last_complete = dwc->completed; 1007 last_complete = chan->completed_cookie;
1008 last_used = chan->cookie; 1008 last_used = chan->cookie;
1009 1009
1010 ret = dma_async_is_complete(cookie, last_complete, last_used); 1010 ret = dma_async_is_complete(cookie, last_complete, last_used);
@@ -1046,7 +1046,7 @@ static int dwc_alloc_chan_resources(struct dma_chan *chan)
1046 return -EIO; 1046 return -EIO;
1047 } 1047 }
1048 1048
1049 dwc->completed = chan->cookie = 1; 1049 chan->completed_cookie = chan->cookie = 1;
1050 1050
1051 /* 1051 /*
1052 * NOTE: some controllers may have additional features that we 1052 * NOTE: some controllers may have additional features that we
@@ -1474,7 +1474,7 @@ static int __init dw_probe(struct platform_device *pdev)
1474 struct dw_dma_chan *dwc = &dw->chan[i]; 1474 struct dw_dma_chan *dwc = &dw->chan[i];
1475 1475
1476 dwc->chan.device = &dw->dma; 1476 dwc->chan.device = &dw->dma;
1477 dwc->chan.cookie = dwc->completed = 1; 1477 dwc->chan.cookie = dwc->chan.completed_cookie = 1;
1478 if (pdata->chan_allocation_order == CHAN_ALLOCATION_ASCENDING) 1478 if (pdata->chan_allocation_order == CHAN_ALLOCATION_ASCENDING)
1479 list_add_tail(&dwc->chan.device_node, 1479 list_add_tail(&dwc->chan.device_node,
1480 &dw->dma.channels); 1480 &dw->dma.channels);