diff options
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r-- | drivers/dma/dw_dmac.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 8a6b85f61176..263b70ee8562 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -819,9 +819,9 @@ static int dwc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) | |||
819 | } | 819 | } |
820 | 820 | ||
821 | static enum dma_status | 821 | static enum dma_status |
822 | dwc_is_tx_complete(struct dma_chan *chan, | 822 | dwc_tx_status(struct dma_chan *chan, |
823 | dma_cookie_t cookie, | 823 | dma_cookie_t cookie, |
824 | dma_cookie_t *done, dma_cookie_t *used) | 824 | struct dma_tx_state *txstate) |
825 | { | 825 | { |
826 | struct dw_dma_chan *dwc = to_dw_dma_chan(chan); | 826 | struct dw_dma_chan *dwc = to_dw_dma_chan(chan); |
827 | dma_cookie_t last_used; | 827 | dma_cookie_t last_used; |
@@ -841,10 +841,11 @@ dwc_is_tx_complete(struct dma_chan *chan, | |||
841 | ret = dma_async_is_complete(cookie, last_complete, last_used); | 841 | ret = dma_async_is_complete(cookie, last_complete, last_used); |
842 | } | 842 | } |
843 | 843 | ||
844 | if (done) | 844 | if (txstate) { |
845 | *done = last_complete; | 845 | txstate->last = last_complete; |
846 | if (used) | 846 | txstate->used = last_used; |
847 | *used = last_used; | 847 | txstate->residue = 0; |
848 | } | ||
848 | 849 | ||
849 | return ret; | 850 | return ret; |
850 | } | 851 | } |
@@ -1346,7 +1347,7 @@ static int __init dw_probe(struct platform_device *pdev) | |||
1346 | dw->dma.device_prep_slave_sg = dwc_prep_slave_sg; | 1347 | dw->dma.device_prep_slave_sg = dwc_prep_slave_sg; |
1347 | dw->dma.device_control = dwc_control; | 1348 | dw->dma.device_control = dwc_control; |
1348 | 1349 | ||
1349 | dw->dma.device_is_tx_complete = dwc_is_tx_complete; | 1350 | dw->dma.device_tx_status = dwc_tx_status; |
1350 | dw->dma.device_issue_pending = dwc_issue_pending; | 1351 | dw->dma.device_issue_pending = dwc_issue_pending; |
1351 | 1352 | ||
1352 | dma_writel(dw, CFG, DW_CFG_DMA_EN); | 1353 | dma_writel(dw, CFG, DW_CFG_DMA_EN); |