diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-11-17 16:42:50 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-12-22 10:04:21 +0300 |
commit | dcabe456b4d4d04606268036d8ca5ce84aa84037 (patch) | |
tree | b0d81fa276af221cf4195f7d66809f5df06d38f6 /drivers/dma/pl330.c | |
parent | 7d15b87dd805bb41cec913fa3935ee242cb6ad3c (diff) | |
download | linux-dcabe456b4d4d04606268036d8ca5ce84aa84037.tar.xz |
dmaengine: pl330: 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>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 5af72962edad..027f1d7ea4fc 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2608,19 +2608,6 @@ static irqreturn_t pl330_irq_handler(int irq, void *data) BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | \ BIT(DMA_SLAVE_BUSWIDTH_8_BYTES) -static int pl330_dma_device_slave_caps(struct dma_chan *dchan, - struct dma_slave_caps *caps) -{ - caps->src_addr_widths = PL330_DMA_BUSWIDTHS; - caps->dst_addr_widths = PL330_DMA_BUSWIDTHS; - caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); - caps->cmd_pause = false; - caps->cmd_terminate = true; - caps->residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR; - - return 0; -} - /* * Runtime PM callbacks are provided by amba/bus.c driver. * @@ -2781,7 +2768,10 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pd->device_config = pl330_config; pd->device_terminate_all = pl330_terminate_all; pd->device_issue_pending = pl330_issue_pending; - pd->device_slave_caps = pl330_dma_device_slave_caps; + pd->src_addr_widths = PL330_DMA_BUSWIDTHS; + pd->dst_addr_widths = PL330_DMA_BUSWIDTHS; + pd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); + pd->residue_granularity = DMA_RESIDUE_GRANULARITY_DESCRIPTOR; ret = dma_async_device_register(pd); if (ret) { |