Commit 09347e3f authored by Vinod Koul's avatar Vinod Koul

dmaengine: jz4740: 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
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 80ade4be
...@@ -113,6 +113,7 @@ struct jz4740_dma_desc { ...@@ -113,6 +113,7 @@ struct jz4740_dma_desc {
struct jz4740_dmaengine_chan { struct jz4740_dmaengine_chan {
struct virt_dma_chan vchan; struct virt_dma_chan vchan;
unsigned int id; unsigned int id;
struct dma_slave_config config;
dma_addr_t fifo_addr; dma_addr_t fifo_addr;
unsigned int transfer_shift; unsigned int transfer_shift;
...@@ -203,8 +204,9 @@ static enum jz4740_dma_transfer_size jz4740_dma_maxburst(u32 maxburst) ...@@ -203,8 +204,9 @@ static enum jz4740_dma_transfer_size jz4740_dma_maxburst(u32 maxburst)
return JZ4740_DMA_TRANSFER_SIZE_32BYTE; return JZ4740_DMA_TRANSFER_SIZE_32BYTE;
} }
static int jz4740_dma_slave_config(struct dma_chan *c, static int jz4740_dma_slave_config_write(struct dma_chan *c,
struct dma_slave_config *config) struct dma_slave_config *config,
enum dma_transfer_direction direction)
{ {
struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c); struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c);
struct jz4740_dma_dev *dmadev = jz4740_dma_chan_get_dev(chan); struct jz4740_dma_dev *dmadev = jz4740_dma_chan_get_dev(chan);
...@@ -214,7 +216,7 @@ static int jz4740_dma_slave_config(struct dma_chan *c, ...@@ -214,7 +216,7 @@ static int jz4740_dma_slave_config(struct dma_chan *c,
enum jz4740_dma_flags flags; enum jz4740_dma_flags flags;
uint32_t cmd; uint32_t cmd;
switch (config->direction) { switch (direction) {
case DMA_MEM_TO_DEV: case DMA_MEM_TO_DEV:
flags = JZ4740_DMA_SRC_AUTOINC; flags = JZ4740_DMA_SRC_AUTOINC;
transfer_size = jz4740_dma_maxburst(config->dst_maxburst); transfer_size = jz4740_dma_maxburst(config->dst_maxburst);
...@@ -265,6 +267,15 @@ static int jz4740_dma_slave_config(struct dma_chan *c, ...@@ -265,6 +267,15 @@ static int jz4740_dma_slave_config(struct dma_chan *c,
return 0; return 0;
} }
static int jz4740_dma_slave_config(struct dma_chan *c,
struct dma_slave_config *config)
{
struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c);
memcpy(&chan->config, config, sizeof(*config));
return 0;
}
static int jz4740_dma_terminate_all(struct dma_chan *c) static int jz4740_dma_terminate_all(struct dma_chan *c)
{ {
struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c); struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c);
...@@ -407,6 +418,8 @@ static struct dma_async_tx_descriptor *jz4740_dma_prep_slave_sg( ...@@ -407,6 +418,8 @@ static struct dma_async_tx_descriptor *jz4740_dma_prep_slave_sg(
desc->direction = direction; desc->direction = direction;
desc->cyclic = false; desc->cyclic = false;
jz4740_dma_slave_config_write(c, &chan->config, direction);
return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
} }
...@@ -438,6 +451,8 @@ static struct dma_async_tx_descriptor *jz4740_dma_prep_dma_cyclic( ...@@ -438,6 +451,8 @@ static struct dma_async_tx_descriptor *jz4740_dma_prep_dma_cyclic(
desc->direction = direction; desc->direction = direction;
desc->cyclic = true; desc->cyclic = true;
jz4740_dma_slave_config_write(c, &chan->config, direction);
return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags); return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
} }
......
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