Commit 314448f0 authored by Vinod Koul's avatar Vinod Koul

dmaengine: mmp_tdma: 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 4e3c4040
...@@ -116,6 +116,7 @@ struct mmp_tdma_chan { ...@@ -116,6 +116,7 @@ struct mmp_tdma_chan {
u32 burst_sz; u32 burst_sz;
enum dma_slave_buswidth buswidth; enum dma_slave_buswidth buswidth;
enum dma_status status; enum dma_status status;
struct dma_slave_config slave_config;
int idx; int idx;
enum mmp_tdma_type type; enum mmp_tdma_type type;
...@@ -139,6 +140,10 @@ struct mmp_tdma_device { ...@@ -139,6 +140,10 @@ struct mmp_tdma_device {
#define to_mmp_tdma_chan(dchan) container_of(dchan, struct mmp_tdma_chan, chan) #define to_mmp_tdma_chan(dchan) container_of(dchan, struct mmp_tdma_chan, chan)
static int mmp_tdma_config_write(struct dma_chan *chan,
enum dma_transfer_direction dir,
struct dma_slave_config *dmaengine_cfg);
static void mmp_tdma_chan_set_desc(struct mmp_tdma_chan *tdmac, dma_addr_t phys) static void mmp_tdma_chan_set_desc(struct mmp_tdma_chan *tdmac, dma_addr_t phys)
{ {
writel(phys, tdmac->reg_base + TDNDPR); writel(phys, tdmac->reg_base + TDNDPR);
...@@ -442,6 +447,8 @@ static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic( ...@@ -442,6 +447,8 @@ static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic(
if (!desc) if (!desc)
goto err_out; goto err_out;
mmp_tdma_config_write(chan, direction, &tdmac->slave_config);
while (buf < buf_len) { while (buf < buf_len) {
desc = &tdmac->desc_arr[i]; desc = &tdmac->desc_arr[i];
...@@ -495,7 +502,18 @@ static int mmp_tdma_config(struct dma_chan *chan, ...@@ -495,7 +502,18 @@ static int mmp_tdma_config(struct dma_chan *chan,
{ {
struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan); struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
if (dmaengine_cfg->direction == DMA_DEV_TO_MEM) { memcpy(&tdmac->slave_config, dmaengine_cfg, sizeof(*dmaengine_cfg));
return 0;
}
static int mmp_tdma_config_write(struct dma_chan *chan,
enum dma_transfer_direction dir,
struct dma_slave_config *dmaengine_cfg)
{
struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
if (dir == DMA_DEV_TO_MEM) {
tdmac->dev_addr = dmaengine_cfg->src_addr; tdmac->dev_addr = dmaengine_cfg->src_addr;
tdmac->burst_sz = dmaengine_cfg->src_maxburst; tdmac->burst_sz = dmaengine_cfg->src_maxburst;
tdmac->buswidth = dmaengine_cfg->src_addr_width; tdmac->buswidth = dmaengine_cfg->src_addr_width;
...@@ -504,7 +522,7 @@ static int mmp_tdma_config(struct dma_chan *chan, ...@@ -504,7 +522,7 @@ static int mmp_tdma_config(struct dma_chan *chan,
tdmac->burst_sz = dmaengine_cfg->dst_maxburst; tdmac->burst_sz = dmaengine_cfg->dst_maxburst;
tdmac->buswidth = dmaengine_cfg->dst_addr_width; tdmac->buswidth = dmaengine_cfg->dst_addr_width;
} }
tdmac->dir = dmaengine_cfg->direction; tdmac->dir = dir;
return mmp_tdma_config_chan(chan); return mmp_tdma_config_chan(chan);
} }
......
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