aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/at_hdmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/at_hdmac.c')
-rw-r--r--drivers/dma/at_hdmac.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index efc1a61ca231..f9143cf9e50a 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -759,13 +759,17 @@ err_desc_get:
759 return NULL; 759 return NULL;
760} 760}
761 761
762static void atc_terminate_all(struct dma_chan *chan) 762static int atc_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd)
763{ 763{
764 struct at_dma_chan *atchan = to_at_dma_chan(chan); 764 struct at_dma_chan *atchan = to_at_dma_chan(chan);
765 struct at_dma *atdma = to_at_dma(chan->device); 765 struct at_dma *atdma = to_at_dma(chan->device);
766 struct at_desc *desc, *_desc; 766 struct at_desc *desc, *_desc;
767 LIST_HEAD(list); 767 LIST_HEAD(list);
768 768
769 /* Only supports DMA_TERMINATE_ALL */
770 if (cmd != DMA_TERMINATE_ALL)
771 return -ENXIO;
772
769 /* 773 /*
770 * This is only called when something went wrong elsewhere, so 774 * This is only called when something went wrong elsewhere, so
771 * we don't really care about the data. Just disable the 775 * we don't really care about the data. Just disable the
@@ -789,6 +793,8 @@ static void atc_terminate_all(struct dma_chan *chan)
789 /* Flush all pending and queued descriptors */ 793 /* Flush all pending and queued descriptors */
790 list_for_each_entry_safe(desc, _desc, &list, desc_node) 794 list_for_each_entry_safe(desc, _desc, &list, desc_node)
791 atc_chain_complete(atchan, desc); 795 atc_chain_complete(atchan, desc);
796
797 return 0;
792} 798}
793 799
794/** 800/**
@@ -1091,7 +1097,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
1091 1097
1092 if (dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask)) { 1098 if (dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask)) {
1093 atdma->dma_common.device_prep_slave_sg = atc_prep_slave_sg; 1099 atdma->dma_common.device_prep_slave_sg = atc_prep_slave_sg;
1094 atdma->dma_common.device_terminate_all = atc_terminate_all; 1100 atdma->dma_common.device_control = atc_control;
1095 } 1101 }
1096 1102
1097 dma_writel(atdma, EN, AT_DMA_ENABLE); 1103 dma_writel(atdma, EN, AT_DMA_ENABLE);