aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2014-11-17 08:42:51 -0500
committerVinod Koul <vinod.koul@intel.com>2014-12-22 02:04:21 -0500
commit07ffa6ba7a364e4ad486fac16d655d4be6dda480 (patch)
treed8f2e4de98e3003918a9558e67ccd2ae6baf86dd
parentdcabe456b4d4d04606268036d8ca5ce84aa84037 (diff)
dmaengine: sirf: Declare slave capabilities for the generic code
Now that the generic slave caps code can make use of the device assigned capabilities, instead of relying on a callback to be implemented. Make use of this code. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/sirf-dma.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index fab9c9c1b421..d0086e9f2082 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -628,18 +628,6 @@ EXPORT_SYMBOL(sirfsoc_dma_filter_id);
628 BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | \ 628 BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | \
629 BIT(DMA_SLAVE_BUSWIDTH_8_BYTES)) 629 BIT(DMA_SLAVE_BUSWIDTH_8_BYTES))
630 630
631static int sirfsoc_dma_device_slave_caps(struct dma_chan *dchan,
632 struct dma_slave_caps *caps)
633{
634 caps->src_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
635 caps->dst_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
636 caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
637 caps->cmd_pause = true;
638 caps->cmd_terminate = true;
639
640 return 0;
641}
642
643static struct dma_chan *of_dma_sirfsoc_xlate(struct of_phandle_args *dma_spec, 631static struct dma_chan *of_dma_sirfsoc_xlate(struct of_phandle_args *dma_spec,
644 struct of_dma *ofdma) 632 struct of_dma *ofdma)
645{ 633{
@@ -726,7 +714,9 @@ static int sirfsoc_dma_probe(struct platform_device *op)
726 dma->device_tx_status = sirfsoc_dma_tx_status; 714 dma->device_tx_status = sirfsoc_dma_tx_status;
727 dma->device_prep_interleaved_dma = sirfsoc_dma_prep_interleaved; 715 dma->device_prep_interleaved_dma = sirfsoc_dma_prep_interleaved;
728 dma->device_prep_dma_cyclic = sirfsoc_dma_prep_cyclic; 716 dma->device_prep_dma_cyclic = sirfsoc_dma_prep_cyclic;
729 dma->device_slave_caps = sirfsoc_dma_device_slave_caps; 717 dma->src_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
718 dma->dst_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
719 dma->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
730 720
731 INIT_LIST_HEAD(&dma->channels); 721 INIT_LIST_HEAD(&dma->channels);
732 dma_cap_set(DMA_SLAVE, dma->cap_mask); 722 dma_cap_set(DMA_SLAVE, dma->cap_mask);