Commit 80ade4be authored by Vinod Koul's avatar Vinod Koul

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 00648f4d
...@@ -1306,6 +1306,7 @@ struct coh901318_chan { ...@@ -1306,6 +1306,7 @@ struct coh901318_chan {
unsigned long nbr_active_done; unsigned long nbr_active_done;
unsigned long busy; unsigned long busy;
struct dma_slave_config config;
u32 addr; u32 addr;
u32 ctrl; u32 ctrl;
...@@ -1402,6 +1403,10 @@ static inline struct coh901318_chan *to_coh901318_chan(struct dma_chan *chan) ...@@ -1402,6 +1403,10 @@ static inline struct coh901318_chan *to_coh901318_chan(struct dma_chan *chan)
return container_of(chan, struct coh901318_chan, chan); return container_of(chan, struct coh901318_chan, chan);
} }
static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
struct dma_slave_config *config,
enum dma_transfer_direction direction);
static inline const struct coh901318_params * static inline const struct coh901318_params *
cohc_chan_param(struct coh901318_chan *cohc) cohc_chan_param(struct coh901318_chan *cohc)
{ {
...@@ -2360,6 +2365,8 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, ...@@ -2360,6 +2365,8 @@ coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
if (lli == NULL) if (lli == NULL)
goto err_dma_alloc; goto err_dma_alloc;
coh901318_dma_set_runtimeconfig(chan, &cohc->config, direction);
/* initiate allocated lli list */ /* initiate allocated lli list */
ret = coh901318_lli_fill_sg(&cohc->base->pool, lli, sgl, sg_len, ret = coh901318_lli_fill_sg(&cohc->base->pool, lli, sgl, sg_len,
cohc->addr, cohc->addr,
...@@ -2499,7 +2506,8 @@ static const struct burst_table burst_sizes[] = { ...@@ -2499,7 +2506,8 @@ static const struct burst_table burst_sizes[] = {
}; };
static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
struct dma_slave_config *config) struct dma_slave_config *config,
enum dma_transfer_direction direction)
{ {
struct coh901318_chan *cohc = to_coh901318_chan(chan); struct coh901318_chan *cohc = to_coh901318_chan(chan);
dma_addr_t addr; dma_addr_t addr;
...@@ -2509,11 +2517,11 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, ...@@ -2509,11 +2517,11 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
int i = 0; int i = 0;
/* We only support mem to per or per to mem transfers */ /* We only support mem to per or per to mem transfers */
if (config->direction == DMA_DEV_TO_MEM) { if (direction == DMA_DEV_TO_MEM) {
addr = config->src_addr; addr = config->src_addr;
addr_width = config->src_addr_width; addr_width = config->src_addr_width;
maxburst = config->src_maxburst; maxburst = config->src_maxburst;
} else if (config->direction == DMA_MEM_TO_DEV) { } else if (direction == DMA_MEM_TO_DEV) {
addr = config->dst_addr; addr = config->dst_addr;
addr_width = config->dst_addr_width; addr_width = config->dst_addr_width;
maxburst = config->dst_maxburst; maxburst = config->dst_maxburst;
...@@ -2579,6 +2587,16 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan, ...@@ -2579,6 +2587,16 @@ static int coh901318_dma_set_runtimeconfig(struct dma_chan *chan,
return 0; return 0;
} }
static int coh901318_dma_slave_config(struct dma_chan *chan,
struct dma_slave_config *config)
{
struct coh901318_chan *cohc = to_coh901318_chan(chan);
memcpy(&cohc->config, config, sizeof(*config));
return 0;
}
static void coh901318_base_init(struct dma_device *dma, const int *pick_chans, static void coh901318_base_init(struct dma_device *dma, const int *pick_chans,
struct coh901318_base *base) struct coh901318_base *base)
{ {
...@@ -2684,7 +2702,7 @@ static int __init coh901318_probe(struct platform_device *pdev) ...@@ -2684,7 +2702,7 @@ static int __init coh901318_probe(struct platform_device *pdev)
base->dma_slave.device_prep_slave_sg = coh901318_prep_slave_sg; base->dma_slave.device_prep_slave_sg = coh901318_prep_slave_sg;
base->dma_slave.device_tx_status = coh901318_tx_status; base->dma_slave.device_tx_status = coh901318_tx_status;
base->dma_slave.device_issue_pending = coh901318_issue_pending; base->dma_slave.device_issue_pending = coh901318_issue_pending;
base->dma_slave.device_config = coh901318_dma_set_runtimeconfig; base->dma_slave.device_config = coh901318_dma_slave_config;
base->dma_slave.device_pause = coh901318_pause; base->dma_slave.device_pause = coh901318_pause;
base->dma_slave.device_resume = coh901318_resume; base->dma_slave.device_resume = coh901318_resume;
base->dma_slave.device_terminate_all = coh901318_terminate_all; base->dma_slave.device_terminate_all = coh901318_terminate_all;
...@@ -2707,7 +2725,7 @@ static int __init coh901318_probe(struct platform_device *pdev) ...@@ -2707,7 +2725,7 @@ static int __init coh901318_probe(struct platform_device *pdev)
base->dma_memcpy.device_prep_dma_memcpy = coh901318_prep_memcpy; base->dma_memcpy.device_prep_dma_memcpy = coh901318_prep_memcpy;
base->dma_memcpy.device_tx_status = coh901318_tx_status; base->dma_memcpy.device_tx_status = coh901318_tx_status;
base->dma_memcpy.device_issue_pending = coh901318_issue_pending; base->dma_memcpy.device_issue_pending = coh901318_issue_pending;
base->dma_memcpy.device_config = coh901318_dma_set_runtimeconfig; base->dma_memcpy.device_config = coh901318_dma_slave_config;
base->dma_memcpy.device_pause = coh901318_pause; base->dma_memcpy.device_pause = coh901318_pause;
base->dma_memcpy.device_resume = coh901318_resume; base->dma_memcpy.device_resume = coh901318_resume;
base->dma_memcpy.device_terminate_all = coh901318_terminate_all; base->dma_memcpy.device_terminate_all = coh901318_terminate_all;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment