Commit 4e3c4040 authored by Vinod Koul's avatar Vinod Koul

dmaengine: ep93xx_dma: 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 2ae1a237
...@@ -109,6 +109,9 @@ ...@@ -109,6 +109,9 @@
#define DMA_MAX_CHAN_DESCRIPTORS 32 #define DMA_MAX_CHAN_DESCRIPTORS 32
struct ep93xx_dma_engine; struct ep93xx_dma_engine;
static int ep93xx_dma_slave_config_write(struct dma_chan *chan,
enum dma_transfer_direction dir,
struct dma_slave_config *config);
/** /**
* struct ep93xx_dma_desc - EP93xx specific transaction descriptor * struct ep93xx_dma_desc - EP93xx specific transaction descriptor
...@@ -180,6 +183,7 @@ struct ep93xx_dma_chan { ...@@ -180,6 +183,7 @@ struct ep93xx_dma_chan {
struct list_head free_list; struct list_head free_list;
u32 runtime_addr; u32 runtime_addr;
u32 runtime_ctrl; u32 runtime_ctrl;
struct dma_slave_config slave_config;
}; };
/** /**
...@@ -1051,6 +1055,8 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, ...@@ -1051,6 +1055,8 @@ ep93xx_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
return NULL; return NULL;
} }
ep93xx_dma_slave_config_write(chan, dir, &edmac->slave_config);
first = NULL; first = NULL;
for_each_sg(sgl, sg, sg_len, i) { for_each_sg(sgl, sg, sg_len, i) {
size_t len = sg_dma_len(sg); size_t len = sg_dma_len(sg);
...@@ -1136,6 +1142,8 @@ ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr, ...@@ -1136,6 +1142,8 @@ ep93xx_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr,
return NULL; return NULL;
} }
ep93xx_dma_slave_config_write(chan, dir, &edmac->slave_config);
/* Split the buffer into period size chunks */ /* Split the buffer into period size chunks */
first = NULL; first = NULL;
for (offset = 0; offset < buf_len; offset += period_len) { for (offset = 0; offset < buf_len; offset += period_len) {
...@@ -1227,6 +1235,17 @@ static int ep93xx_dma_slave_config(struct dma_chan *chan, ...@@ -1227,6 +1235,17 @@ static int ep93xx_dma_slave_config(struct dma_chan *chan,
struct dma_slave_config *config) struct dma_slave_config *config)
{ {
struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan); struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
memcpy(&edmac->slave_config, config, sizeof(*config));
return 0;
}
static int ep93xx_dma_slave_config_write(struct dma_chan *chan,
enum dma_transfer_direction dir,
struct dma_slave_config *config)
{
struct ep93xx_dma_chan *edmac = to_ep93xx_dma_chan(chan);
enum dma_slave_buswidth width; enum dma_slave_buswidth width;
unsigned long flags; unsigned long flags;
u32 addr, ctrl; u32 addr, ctrl;
...@@ -1234,7 +1253,7 @@ static int ep93xx_dma_slave_config(struct dma_chan *chan, ...@@ -1234,7 +1253,7 @@ static int ep93xx_dma_slave_config(struct dma_chan *chan,
if (!edmac->edma->m2m) if (!edmac->edma->m2m)
return -EINVAL; return -EINVAL;
switch (config->direction) { switch (dir) {
case DMA_DEV_TO_MEM: case DMA_DEV_TO_MEM:
width = config->src_addr_width; width = config->src_addr_width;
addr = config->src_addr; addr = config->src_addr;
......
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