aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorRongjun Ying <rongjun.ying@csr.com>2013-12-23 07:19:21 -0500
committerVinod Koul <vinod.koul@intel.com>2014-01-20 02:47:31 -0500
commitba07d812f58c0ec65fff981a085529ed88965d23 (patch)
treec63e168e5dbfc5cc92b7c33b3d83ee1e528c8a06 /drivers/dma
parent0ca583a239a854fd403bf8b659cdff8c603372c9 (diff)
dmaengine: sirf: Add device_slave_caps interface
this patch adds device_slave_caps() callback as SiRF SoC sound drivers depend on it. Signed-off-by: Rongjun Ying <rongjun.ying@csr.com> Signed-off-by: Barry Song <Barry.Song@csr.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/sirf-dma.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index 6aec3ad814d3..d4d3a3109b16 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -640,6 +640,25 @@ bool sirfsoc_dma_filter_id(struct dma_chan *chan, void *chan_id)
640} 640}
641EXPORT_SYMBOL(sirfsoc_dma_filter_id); 641EXPORT_SYMBOL(sirfsoc_dma_filter_id);
642 642
643#define SIRFSOC_DMA_BUSWIDTHS \
644 (BIT(DMA_SLAVE_BUSWIDTH_UNDEFINED) | \
645 BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
646 BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
647 BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | \
648 BIT(DMA_SLAVE_BUSWIDTH_8_BYTES))
649
650static int sirfsoc_dma_device_slave_caps(struct dma_chan *dchan,
651 struct dma_slave_caps *caps)
652{
653 caps->src_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
654 caps->dstn_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
655 caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
656 caps->cmd_pause = true;
657 caps->cmd_terminate = true;
658
659 return 0;
660}
661
643static int sirfsoc_dma_probe(struct platform_device *op) 662static int sirfsoc_dma_probe(struct platform_device *op)
644{ 663{
645 struct device_node *dn = op->dev.of_node; 664 struct device_node *dn = op->dev.of_node;
@@ -712,6 +731,7 @@ static int sirfsoc_dma_probe(struct platform_device *op)
712 dma->device_tx_status = sirfsoc_dma_tx_status; 731 dma->device_tx_status = sirfsoc_dma_tx_status;
713 dma->device_prep_interleaved_dma = sirfsoc_dma_prep_interleaved; 732 dma->device_prep_interleaved_dma = sirfsoc_dma_prep_interleaved;
714 dma->device_prep_dma_cyclic = sirfsoc_dma_prep_cyclic; 733 dma->device_prep_dma_cyclic = sirfsoc_dma_prep_cyclic;
734 dma->device_slave_caps = sirfsoc_dma_device_slave_caps;
715 735
716 INIT_LIST_HEAD(&dma->channels); 736 INIT_LIST_HEAD(&dma->channels);
717 dma_cap_set(DMA_SLAVE, dma->cap_mask); 737 dma_cap_set(DMA_SLAVE, dma->cap_mask);