aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2018-07-19 12:52:26 -0400
committerVinod Koul <vkoul@kernel.org>2018-10-07 09:49:03 -0400
commit80ade4beb7330f4c6c855619d21062190303a5a3 (patch)
treeaccfb60113858f99bf1d93b5e4e48f73e61b0c57
parent00648f4d0f4156b747de272e962991e5dca2d603 (diff)
dmaengine: coh901318: remove dma_slave_config direction usage
dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/coh901318.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c
index da74fd74636b..eebaba3d9e78 100644
--- a/drivers/dma/coh901318.c
+++ b/drivers/dma/coh901318.c
@@ -1306,6 +1306,7 @@ struct coh901318_chan {
1306 unsigned long nbr_active_done; 1306 unsigned long nbr_active_done;
1307 unsigned long busy; 1307 unsigned long busy;
1308 1308
1309 struct dma_slave_config config;
1309 u32 addr; 1310 u32 addr;
1310 u32 ctrl; 1311 u32 ctrl;
1311 1312
@@ -1402,6 +1403,10 @@ static inline struct coh901318_chan *to_coh901318_chan(struct dma_chan *chan)
1402 return container_of(chan, struct coh901318_chan, chan); 1403 return container_of(chan, struct coh901318_chan, chan);
1403} 1404}
1404 1405
1406static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
1407 struct dma_slave_config *config,
1408 enum dma_transfer_direction direction);
1409
1405static inline const struct coh901318_params * 1410static inline const struct coh901318_params *
1406cohc_chan_param(struct coh901318_chan *cohc) 1411cohc_chan_param(struct coh901318_chan *cohc)
1407{ 1412{
@@ -2360,6 +2365,8 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
2360 if (lli == NULL) 2365 if (lli == NULL)
2361 goto err_dma_alloc; 2366 goto err_dma_alloc;
2362 2367
2368 coh901318_dma_set_runtimeconfig(chan, &cohc->config, direction);
2369
2363 /* initiate allocated lli list */ 2370 /* initiate allocated lli list */
2364 ret = coh901318_lli_fill_sg(&cohc->base->pool, lli, sgl, sg_len, 2371 ret = coh901318_lli_fill_sg(&cohc->base->pool, lli, sgl, sg_len,
2365 cohc->addr, 2372 cohc->addr,
@@ -2499,7 +2506,8 @@ static const struct burst_table burst_sizes[] = {
2499}; 2506};
2500 2507
2501static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, 2508static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
2502 struct dma_slave_config *config) 2509 struct dma_slave_config *config,
2510 enum dma_transfer_direction direction)
2503{ 2511{
2504 struct coh901318_chan *cohc = to_coh901318_chan(chan); 2512 struct coh901318_chan *cohc = to_coh901318_chan(chan);
2505 dma_addr_t addr; 2513 dma_addr_t addr;
@@ -2509,11 +2517,11 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
2509 int i = 0; 2517 int i = 0;
2510 2518
2511 /* We only support mem to per or per to mem transfers */ 2519 /* We only support mem to per or per to mem transfers */
2512 if (config->direction == DMA_DEV_TO_MEM) { 2520 if (direction == DMA_DEV_TO_MEM) {
2513 addr = config->src_addr; 2521 addr = config->src_addr;
2514 addr_width = config->src_addr_width; 2522 addr_width = config->src_addr_width;
2515 maxburst = config->src_maxburst; 2523 maxburst = config->src_maxburst;
2516 } else if (config->direction == DMA_MEM_TO_DEV) { 2524 } else if (direction == DMA_MEM_TO_DEV) {
2517 addr = config->dst_addr; 2525 addr = config->dst_addr;
2518 addr_width = config->dst_addr_width; 2526 addr_width = config->dst_addr_width;
2519 maxburst = config->dst_maxburst; 2527 maxburst = config->dst_maxburst;
@@ -2579,6 +2587,16 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
2579 return 0; 2587 return 0;
2580} 2588}
2581 2589
2590static int coh901318_dma_slave_config(struct dma_chan *chan,
2591 struct dma_slave_config *config)
2592{
2593 struct coh901318_chan *cohc = to_coh901318_chan(chan);
2594
2595 memcpy(&cohc->config, config, sizeof(*config));
2596
2597 return 0;
2598}
2599
2582static void coh901318_base_init(struct dma_device *dma, const int *pick_chans, 2600static void coh901318_base_init(struct dma_device *dma, const int *pick_chans,
2583 struct coh901318_base *base) 2601 struct coh901318_base *base)
2584{ 2602{
@@ -2684,7 +2702,7 @@ static int __init coh901318_probe(struct platform_device *pdev)
2684 base->dma_slave.device_prep_slave_sg = coh901318_prep_slave_sg; 2702 base->dma_slave.device_prep_slave_sg = coh901318_prep_slave_sg;
2685 base->dma_slave.device_tx_status = coh901318_tx_status; 2703 base->dma_slave.device_tx_status = coh901318_tx_status;
2686 base->dma_slave.device_issue_pending = coh901318_issue_pending; 2704 base->dma_slave.device_issue_pending = coh901318_issue_pending;
2687 base->dma_slave.device_config = coh901318_dma_set_runtimeconfig; 2705 base->dma_slave.device_config = coh901318_dma_slave_config;
2688 base->dma_slave.device_pause = coh901318_pause; 2706 base->dma_slave.device_pause = coh901318_pause;
2689 base->dma_slave.device_resume = coh901318_resume; 2707 base->dma_slave.device_resume = coh901318_resume;
2690 base->dma_slave.device_terminate_all = coh901318_terminate_all; 2708 base->dma_slave.device_terminate_all = coh901318_terminate_all;
@@ -2707,7 +2725,7 @@ static int __init coh901318_probe(struct platform_device *pdev)
2707 base->dma_memcpy.device_prep_dma_memcpy = coh901318_prep_memcpy; 2725 base->dma_memcpy.device_prep_dma_memcpy = coh901318_prep_memcpy;
2708 base->dma_memcpy.device_tx_status = coh901318_tx_status; 2726 base->dma_memcpy.device_tx_status = coh901318_tx_status;
2709 base->dma_memcpy.device_issue_pending = coh901318_issue_pending; 2727 base->dma_memcpy.device_issue_pending = coh901318_issue_pending;
2710 base->dma_memcpy.device_config = coh901318_dma_set_runtimeconfig; 2728 base->dma_memcpy.device_config = coh901318_dma_slave_config;
2711 base->dma_memcpy.device_pause = coh901318_pause; 2729 base->dma_memcpy.device_pause = coh901318_pause;
2712 base->dma_memcpy.device_resume = coh901318_resume; 2730 base->dma_memcpy.device_resume = coh901318_resume;
2713 base->dma_memcpy.device_terminate_all = coh901318_terminate_all; 2731 base->dma_memcpy.device_terminate_all = coh901318_terminate_all;