diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-11-17 16:42:47 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-12-22 10:03:23 +0300 |
commit | 9f59cd0519c3b68bae7d9bef65d32722ce653a93 (patch) | |
tree | 770aa77ed94c803744325b0c4a3d2d9eec91f9f1 /drivers/dma | |
parent | f45c431148e1ba0d7b2b9f9d106ec7aab6d00830 (diff) | |
download | linux-9f59cd0519c3b68bae7d9bef65d32722ce653a93.tar.xz |
dmaengine: edma: 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')
-rw-r--r-- | drivers/dma/edma.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 8feb096786f8..e95fa7dabc0c 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -971,19 +971,6 @@ static void __init edma_chan_init(struct edma_cc *ecc, BIT(DMA_SLAVE_BUSWIDTH_3_BYTES) | \ BIT(DMA_SLAVE_BUSWIDTH_4_BYTES)) -static int edma_dma_device_slave_caps(struct dma_chan *dchan, - struct dma_slave_caps *caps) -{ - caps->src_addr_widths = EDMA_DMA_BUSWIDTHS; - caps->dst_addr_widths = EDMA_DMA_BUSWIDTHS; - caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); - caps->cmd_pause = true; - caps->cmd_terminate = true; - caps->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; - - return 0; -} - static void edma_dma_init(struct edma_cc *ecc, struct dma_device *dma, struct device *dev) { @@ -998,7 +985,12 @@ static void edma_dma_init(struct edma_cc *ecc, struct dma_device *dma, dma->device_pause = edma_dma_pause; dma->device_resume = edma_dma_resume; dma->device_terminate_all = edma_terminate_all; - dma->device_slave_caps = edma_dma_device_slave_caps; + + dma->src_addr_widths = EDMA_DMA_BUSWIDTHS; + dma->dst_addr_widths = EDMA_DMA_BUSWIDTHS; + dma->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); + dma->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; + dma->dev = dev; /* |