diff options
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r-- | drivers/dma/dw_dmac.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index d28369f7afd2..8a6b85f61176 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -781,13 +781,17 @@ err_desc_get: | |||
781 | return NULL; | 781 | return NULL; |
782 | } | 782 | } |
783 | 783 | ||
784 | static void dwc_terminate_all(struct dma_chan *chan) | 784 | static int dwc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) |
785 | { | 785 | { |
786 | struct dw_dma_chan *dwc = to_dw_dma_chan(chan); | 786 | struct dw_dma_chan *dwc = to_dw_dma_chan(chan); |
787 | struct dw_dma *dw = to_dw_dma(chan->device); | 787 | struct dw_dma *dw = to_dw_dma(chan->device); |
788 | struct dw_desc *desc, *_desc; | 788 | struct dw_desc *desc, *_desc; |
789 | LIST_HEAD(list); | 789 | LIST_HEAD(list); |
790 | 790 | ||
791 | /* Only supports DMA_TERMINATE_ALL */ | ||
792 | if (cmd != DMA_TERMINATE_ALL) | ||
793 | return -ENXIO; | ||
794 | |||
791 | /* | 795 | /* |
792 | * This is only called when something went wrong elsewhere, so | 796 | * This is only called when something went wrong elsewhere, so |
793 | * we don't really care about the data. Just disable the | 797 | * we don't really care about the data. Just disable the |
@@ -810,6 +814,8 @@ static void dwc_terminate_all(struct dma_chan *chan) | |||
810 | /* Flush all pending and queued descriptors */ | 814 | /* Flush all pending and queued descriptors */ |
811 | list_for_each_entry_safe(desc, _desc, &list, desc_node) | 815 | list_for_each_entry_safe(desc, _desc, &list, desc_node) |
812 | dwc_descriptor_complete(dwc, desc); | 816 | dwc_descriptor_complete(dwc, desc); |
817 | |||
818 | return 0; | ||
813 | } | 819 | } |
814 | 820 | ||
815 | static enum dma_status | 821 | static enum dma_status |
@@ -1338,7 +1344,7 @@ static int __init dw_probe(struct platform_device *pdev) | |||
1338 | dw->dma.device_prep_dma_memcpy = dwc_prep_dma_memcpy; | 1344 | dw->dma.device_prep_dma_memcpy = dwc_prep_dma_memcpy; |
1339 | 1345 | ||
1340 | dw->dma.device_prep_slave_sg = dwc_prep_slave_sg; | 1346 | dw->dma.device_prep_slave_sg = dwc_prep_slave_sg; |
1341 | dw->dma.device_terminate_all = dwc_terminate_all; | 1347 | dw->dma.device_control = dwc_control; |
1342 | 1348 | ||
1343 | dw->dma.device_is_tx_complete = dwc_is_tx_complete; | 1349 | dw->dma.device_is_tx_complete = dwc_is_tx_complete; |
1344 | dw->dma.device_issue_pending = dwc_issue_pending; | 1350 | dw->dma.device_issue_pending = dwc_issue_pending; |