Commit cee8cbfc authored by Frank Li's avatar Frank Li Committed by Vinod Koul

dmaengine: fsl-edma: remove 'slave_id' from fsl_edma_chan

The 'slave_id' field is redundant as it duplicates the functionality of
'srcid'. Remove 'slave_id' from fsl_edma_chan to eliminate redundancy.
Signed-off-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240323-8ulp_edma-v3-1-c0e981027c05@nxp.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent e32634f4
...@@ -151,7 +151,6 @@ struct fsl_edma_chan { ...@@ -151,7 +151,6 @@ struct fsl_edma_chan {
enum dma_status status; enum dma_status status;
enum fsl_edma_pm_state pm_state; enum fsl_edma_pm_state pm_state;
bool idle; bool idle;
u32 slave_id;
struct fsl_edma_engine *edma; struct fsl_edma_engine *edma;
struct fsl_edma_desc *edesc; struct fsl_edma_desc *edesc;
struct dma_slave_config cfg; struct dma_slave_config cfg;
......
...@@ -114,8 +114,8 @@ static struct dma_chan *fsl_edma_xlate(struct of_phandle_args *dma_spec, ...@@ -114,8 +114,8 @@ static struct dma_chan *fsl_edma_xlate(struct of_phandle_args *dma_spec,
if (chan) { if (chan) {
chan->device->privatecnt++; chan->device->privatecnt++;
fsl_chan = to_fsl_edma_chan(chan); fsl_chan = to_fsl_edma_chan(chan);
fsl_chan->slave_id = dma_spec->args[1]; fsl_chan->srcid = dma_spec->args[1];
fsl_edma_chan_mux(fsl_chan, fsl_chan->slave_id, fsl_edma_chan_mux(fsl_chan, fsl_chan->srcid,
true); true);
mutex_unlock(&fsl_edma->fsl_edma_mutex); mutex_unlock(&fsl_edma->fsl_edma_mutex);
return chan; return chan;
...@@ -540,7 +540,7 @@ static int fsl_edma_probe(struct platform_device *pdev) ...@@ -540,7 +540,7 @@ static int fsl_edma_probe(struct platform_device *pdev)
fsl_chan->edma = fsl_edma; fsl_chan->edma = fsl_edma;
fsl_chan->pm_state = RUNNING; fsl_chan->pm_state = RUNNING;
fsl_chan->slave_id = 0; fsl_chan->srcid = 0;
fsl_chan->idle = true; fsl_chan->idle = true;
fsl_chan->dma_dir = DMA_NONE; fsl_chan->dma_dir = DMA_NONE;
fsl_chan->vchan.desc_free = fsl_edma_free_desc; fsl_chan->vchan.desc_free = fsl_edma_free_desc;
...@@ -682,8 +682,8 @@ static int fsl_edma_resume_early(struct device *dev) ...@@ -682,8 +682,8 @@ static int fsl_edma_resume_early(struct device *dev)
continue; continue;
fsl_chan->pm_state = RUNNING; fsl_chan->pm_state = RUNNING;
edma_write_tcdreg(fsl_chan, 0, csr); edma_write_tcdreg(fsl_chan, 0, csr);
if (fsl_chan->slave_id != 0) if (fsl_chan->srcid != 0)
fsl_edma_chan_mux(fsl_chan, fsl_chan->slave_id, true); fsl_edma_chan_mux(fsl_chan, fsl_chan->srcid, true);
} }
if (!(fsl_edma->drvdata->flags & FSL_EDMA_DRV_SPLIT_REG)) if (!(fsl_edma->drvdata->flags & FSL_EDMA_DRV_SPLIT_REG))
......
...@@ -195,7 +195,7 @@ static int mcf_edma_probe(struct platform_device *pdev) ...@@ -195,7 +195,7 @@ static int mcf_edma_probe(struct platform_device *pdev)
struct fsl_edma_chan *mcf_chan = &mcf_edma->chans[i]; struct fsl_edma_chan *mcf_chan = &mcf_edma->chans[i];
mcf_chan->edma = mcf_edma; mcf_chan->edma = mcf_edma;
mcf_chan->slave_id = i; mcf_chan->srcid = i;
mcf_chan->idle = true; mcf_chan->idle = true;
mcf_chan->dma_dir = DMA_NONE; mcf_chan->dma_dir = DMA_NONE;
mcf_chan->vchan.desc_free = fsl_edma_free_desc; mcf_chan->vchan.desc_free = fsl_edma_free_desc;
...@@ -277,7 +277,7 @@ bool mcf_edma_filter_fn(struct dma_chan *chan, void *param) ...@@ -277,7 +277,7 @@ bool mcf_edma_filter_fn(struct dma_chan *chan, void *param)
if (chan->device->dev->driver == &mcf_edma_driver.driver) { if (chan->device->dev->driver == &mcf_edma_driver.driver) {
struct fsl_edma_chan *mcf_chan = to_fsl_edma_chan(chan); struct fsl_edma_chan *mcf_chan = to_fsl_edma_chan(chan);
return (mcf_chan->slave_id == (uintptr_t)param); return (mcf_chan->srcid == (uintptr_t)param);
} }
return false; return false;
......
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