diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-11-17 08:42:48 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-12-22 02:03:23 -0500 |
commit | 03526d3a67fd2f171f56ce0576d1b7b76ae7e23e (patch) | |
tree | 2cb53e264c5849b6010fdcb92283054c02b65c2a | |
parent | 9f59cd0519c3b68bae7d9bef65d32722ce653a93 (diff) |
dmaengine: nbpfaxi: 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/nbpfaxi.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c index 0202602597f7..46c013b527cd 100644 --- a/drivers/dma/nbpfaxi.c +++ b/drivers/dma/nbpfaxi.c | |||
@@ -1069,18 +1069,6 @@ static void nbpf_free_chan_resources(struct dma_chan *dchan) | |||
1069 | } | 1069 | } |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | static int nbpf_slave_caps(struct dma_chan *dchan, | ||
1073 | struct dma_slave_caps *caps) | ||
1074 | { | ||
1075 | caps->src_addr_widths = NBPF_DMA_BUSWIDTHS; | ||
1076 | caps->dst_addr_widths = NBPF_DMA_BUSWIDTHS; | ||
1077 | caps->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
1078 | caps->cmd_pause = false; | ||
1079 | caps->cmd_terminate = true; | ||
1080 | |||
1081 | return 0; | ||
1082 | } | ||
1083 | |||
1084 | static struct dma_chan *nbpf_of_xlate(struct of_phandle_args *dma_spec, | 1072 | static struct dma_chan *nbpf_of_xlate(struct of_phandle_args *dma_spec, |
1085 | struct of_dma *ofdma) | 1073 | struct of_dma *ofdma) |
1086 | { | 1074 | { |
@@ -1411,7 +1399,6 @@ static int nbpf_probe(struct platform_device *pdev) | |||
1411 | dma_dev->device_prep_dma_memcpy = nbpf_prep_memcpy; | 1399 | dma_dev->device_prep_dma_memcpy = nbpf_prep_memcpy; |
1412 | dma_dev->device_tx_status = nbpf_tx_status; | 1400 | dma_dev->device_tx_status = nbpf_tx_status; |
1413 | dma_dev->device_issue_pending = nbpf_issue_pending; | 1401 | dma_dev->device_issue_pending = nbpf_issue_pending; |
1414 | dma_dev->device_slave_caps = nbpf_slave_caps; | ||
1415 | 1402 | ||
1416 | /* | 1403 | /* |
1417 | * If we drop support for unaligned MEMCPY buffer addresses and / or | 1404 | * If we drop support for unaligned MEMCPY buffer addresses and / or |
@@ -1427,6 +1414,10 @@ static int nbpf_probe(struct platform_device *pdev) | |||
1427 | dma_dev->device_pause = nbpf_pause; | 1414 | dma_dev->device_pause = nbpf_pause; |
1428 | dma_dev->device_terminate_all = nbpf_terminate_all; | 1415 | dma_dev->device_terminate_all = nbpf_terminate_all; |
1429 | 1416 | ||
1417 | dma_dev->src_addr_widths = NBPF_DMA_BUSWIDTHS; | ||
1418 | dma_dev->dst_addr_widths = NBPF_DMA_BUSWIDTHS; | ||
1419 | dma_dev->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV); | ||
1420 | |||
1430 | platform_set_drvdata(pdev, nbpf); | 1421 | platform_set_drvdata(pdev, nbpf); |
1431 | 1422 | ||
1432 | ret = clk_prepare_enable(nbpf->clk); | 1423 | ret = clk_prepare_enable(nbpf->clk); |