diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-11-17 08:42:49 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-12-22 02:03:24 -0500 |
commit | 7d15b87dd805bb41cec913fa3935ee242cb6ad3c (patch) | |
tree | 350ce7f82621eed0e06ade28952f24d8984e1924 | |
parent | 03526d3a67fd2f171f56ce0576d1b7b76ae7e23e (diff) |
dmaengine: omap: 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>
-rw-r--r-- | drivers/dma/omap-dma.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index c84fe4a35022..2654057d46bd 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c | |||
@@ -1070,19 +1070,6 @@ static void omap_dma_free(struct omap_dmadev *od) | |||
1070 | BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \ | 1070 | BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \ |
1071 | BIT(DMA_SLAVE_BUSWIDTH_4_BYTES)) | 1071 | BIT(DMA_SLAVE_BUSWIDTH_4_BYTES)) |
1072 | 1072 | ||
1073 | static int omap_dma_device_slave_caps(struct dma_chan *dchan, | ||
1074 | struct dma_slave_caps *caps) | ||
1075 | { | ||
1076 | caps->src_addr_widths = OMAP_DMA_BUSWIDTHS; | ||
1077 | caps->dst_addr_widths = OMAP_DMA_BUSWIDTHS; | ||
1078 | caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
1079 | caps->cmd_pause = true; | ||
1080 | caps->cmd_terminate = true; | ||
1081 | caps->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; | ||
1082 | |||
1083 | return 0; | ||
1084 | } | ||
1085 | |||
1086 | static int omap_dma_probe(struct platform_device *pdev) | 1073 | static int omap_dma_probe(struct platform_device *pdev) |
1087 | { | 1074 | { |
1088 | struct omap_dmadev *od; | 1075 | struct omap_dmadev *od; |
@@ -1116,7 +1103,10 @@ static int omap_dma_probe(struct platform_device *pdev) | |||
1116 | od->ddev.device_pause = omap_dma_pause; | 1103 | od->ddev.device_pause = omap_dma_pause; |
1117 | od->ddev.device_resume = omap_dma_resume; | 1104 | od->ddev.device_resume = omap_dma_resume; |
1118 | od->ddev.device_terminate_all = omap_dma_terminate_all; | 1105 | od->ddev.device_terminate_all = omap_dma_terminate_all; |
1119 | od->ddev.device_slave_caps = omap_dma_device_slave_caps; | 1106 | od->ddev.src_addr_widths = OMAP_DMA_BUSWIDTHS; |
1107 | od->ddev.dst_addr_widths = OMAP_DMA_BUSWIDTHS; | ||
1108 | od->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
1109 | od->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST; | ||
1120 | od->ddev.dev = &pdev->dev; | 1110 | od->ddev.dev = &pdev->dev; |
1121 | INIT_LIST_HEAD(&od->ddev.channels); | 1111 | INIT_LIST_HEAD(&od->ddev.channels); |
1122 | INIT_LIST_HEAD(&od->pending); | 1112 | INIT_LIST_HEAD(&od->pending); |