diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-11-17 08:42:45 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-12-22 02:03:23 -0500 |
commit | b574368024670ab654d3aa79df0ed5a754790efe (patch) | |
tree | 635f2a424962885845bff9277ab0f7ad2ce763d3 /drivers/dma/bcm2835-dma.c | |
parent | 8ac82f889c525243b3b3b64117bbd8f810aac29b (diff) |
dmaengine: bcm2835: 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>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/bcm2835-dma.c')
-rw-r--r-- | drivers/dma/bcm2835-dma.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index 13b05c1673b1..0723096fb50a 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c | |||
@@ -550,18 +550,6 @@ static struct dma_chan *bcm2835_dma_xlate(struct of_phandle_args *spec, | |||
550 | return chan; | 550 | return chan; |
551 | } | 551 | } |
552 | 552 | ||
553 | static int bcm2835_dma_device_slave_caps(struct dma_chan *dchan, | ||
554 | struct dma_slave_caps *caps) | ||
555 | { | ||
556 | caps->src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); | ||
557 | caps->dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); | ||
558 | caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
559 | caps->cmd_pause = false; | ||
560 | caps->cmd_terminate = true; | ||
561 | |||
562 | return 0; | ||
563 | } | ||
564 | |||
565 | static int bcm2835_dma_probe(struct platform_device *pdev) | 553 | static int bcm2835_dma_probe(struct platform_device *pdev) |
566 | { | 554 | { |
567 | struct bcm2835_dmadev *od; | 555 | struct bcm2835_dmadev *od; |
@@ -603,6 +591,9 @@ static int bcm2835_dma_probe(struct platform_device *pdev) | |||
603 | od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; | 591 | od->ddev.device_prep_dma_cyclic = bcm2835_dma_prep_dma_cyclic; |
604 | od->ddev.device_config = bcm2835_dma_slave_config; | 592 | od->ddev.device_config = bcm2835_dma_slave_config; |
605 | od->ddev.device_terminate_all = bcm2835_dma_terminate_all; | 593 | od->ddev.device_terminate_all = bcm2835_dma_terminate_all; |
594 | od->ddev.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); | ||
595 | od->ddev.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES); | ||
596 | od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
606 | od->ddev.dev = &pdev->dev; | 597 | od->ddev.dev = &pdev->dev; |
607 | INIT_LIST_HEAD(&od->ddev.channels); | 598 | INIT_LIST_HEAD(&od->ddev.channels); |
608 | spin_lock_init(&od->lock); | 599 | spin_lock_init(&od->lock); |