diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-11-17 08:42:46 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-12-22 02:03:23 -0500 |
commit | f45c431148e1ba0d7b2b9f9d106ec7aab6d00830 (patch) | |
tree | c834528edfbdf9731a0ba093a80d54048e6c1a43 /drivers/dma/fsl-edma.c | |
parent | b574368024670ab654d3aa79df0ed5a754790efe (diff) |
dmaengine: fsl-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/fsl-edma.c')
-rw-r--r-- | drivers/dma/fsl-edma.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c index d96a4aff2f4e..09e2842d15ec 100644 --- a/drivers/dma/fsl-edma.c +++ b/drivers/dma/fsl-edma.c | |||
@@ -787,18 +787,6 @@ static void fsl_edma_free_chan_resources(struct dma_chan *chan) | |||
787 | fsl_chan->tcd_pool = NULL; | 787 | fsl_chan->tcd_pool = NULL; |
788 | } | 788 | } |
789 | 789 | ||
790 | static int fsl_dma_device_slave_caps(struct dma_chan *dchan, | ||
791 | struct dma_slave_caps *caps) | ||
792 | { | ||
793 | caps->src_addr_widths = FSL_EDMA_BUSWIDTHS; | ||
794 | caps->dst_addr_widths = FSL_EDMA_BUSWIDTHS; | ||
795 | caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
796 | caps->cmd_pause = true; | ||
797 | caps->cmd_terminate = true; | ||
798 | |||
799 | return 0; | ||
800 | } | ||
801 | |||
802 | static int | 790 | static int |
803 | fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma) | 791 | fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma) |
804 | { | 792 | { |
@@ -929,7 +917,10 @@ static int fsl_edma_probe(struct platform_device *pdev) | |||
929 | fsl_edma->dma_dev.device_resume = fsl_edma_resume; | 917 | fsl_edma->dma_dev.device_resume = fsl_edma_resume; |
930 | fsl_edma->dma_dev.device_terminate_all = fsl_edma_terminate_all; | 918 | fsl_edma->dma_dev.device_terminate_all = fsl_edma_terminate_all; |
931 | fsl_edma->dma_dev.device_issue_pending = fsl_edma_issue_pending; | 919 | fsl_edma->dma_dev.device_issue_pending = fsl_edma_issue_pending; |
932 | fsl_edma->dma_dev.device_slave_caps = fsl_dma_device_slave_caps; | 920 | |
921 | fsl_edma->dma_dev.src_addr_widths = FSL_EDMA_BUSWIDTHS; | ||
922 | fsl_edma->dma_dev.dst_addr_widths = FSL_EDMA_BUSWIDTHS; | ||
923 | fsl_edma->dma_dev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
933 | 924 | ||
934 | platform_set_drvdata(pdev, fsl_edma); | 925 | platform_set_drvdata(pdev, fsl_edma); |
935 | 926 | ||