dmaengine: sirf: Declare slave capabilities for the generic code
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 17 Nov 2014 13:42:51 +0000 (14:42 +0100)
committerVinod Koul <vinod.koul@intel.com>
Mon, 22 Dec 2014 07:04:21 +0000 (12:34 +0530)
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>
drivers/dma/sirf-dma.c

index fab9c9c1b421be0df0f6aa7c04bd87d95af92571..d0086e9f20824efa697144a8ea4f5adf345f3635 100644 (file)
@@ -628,18 +628,6 @@ EXPORT_SYMBOL(sirfsoc_dma_filter_id);
        BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | \
        BIT(DMA_SLAVE_BUSWIDTH_8_BYTES))
 
-static int sirfsoc_dma_device_slave_caps(struct dma_chan *dchan,
-       struct dma_slave_caps *caps)
-{
-       caps->src_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
-       caps->dst_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
-       caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
-       caps->cmd_pause = true;
-       caps->cmd_terminate = true;
-
-       return 0;
-}
-
 static struct dma_chan *of_dma_sirfsoc_xlate(struct of_phandle_args *dma_spec,
        struct of_dma *ofdma)
 {
@@ -726,7 +714,9 @@ static int sirfsoc_dma_probe(struct platform_device *op)
        dma->device_tx_status = sirfsoc_dma_tx_status;
        dma->device_prep_interleaved_dma = sirfsoc_dma_prep_interleaved;
        dma->device_prep_dma_cyclic = sirfsoc_dma_prep_cyclic;
-       dma->device_slave_caps = sirfsoc_dma_device_slave_caps;
+       dma->src_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
+       dma->dst_addr_widths = SIRFSOC_DMA_BUSWIDTHS;
+       dma->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
 
        INIT_LIST_HEAD(&dma->channels);
        dma_cap_set(DMA_SLAVE, dma->cap_mask);