1 From f8692ecd13a787c51eca9234312f5f3fd163a04a Mon Sep 17 00:00:00 2001
2 From: Shengjiu Wang <shengjiu.wang@freescale.com>
3 Date: Mon, 5 Jun 2017 11:05:52 +0800
4 Subject: [PATCH] MLK-15003-1: DMA: fsl-edma-v3: add one more parameter for
7 The parameter is "is_remote", which is to use remote access for
8 edma, the default access is local access.
10 Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
11 (cherry picked from commit eee976b30b0523680f30e762742984f5b5a01b97)
13 drivers/dma/fsl-edma-v3.c | 8 +++++++-
14 1 file changed, 7 insertions(+), 1 deletion(-)
16 --- a/drivers/dma/fsl-edma-v3.c
17 +++ b/drivers/dma/fsl-edma-v3.c
18 @@ -139,6 +139,7 @@ struct fsl_edma3_chan {
23 struct dma_pool *tcd_pool;
26 @@ -189,6 +190,10 @@ static void fsl_edma3_enable_request(str
28 val |= EDMA_CH_SBR_WR;
31 + if (fsl_chan->is_remote)
32 + val &= ~(EDMA_CH_SBR_RD | EDMA_CH_SBR_WR);
34 writel(val, addr + EDMA_CH_SBR);
36 val = readl(addr + EDMA_CH_CSR);
37 @@ -686,7 +691,7 @@ static struct dma_chan *fsl_edma3_xlate(
38 struct dma_chan *chan, *_chan;
39 struct fsl_edma3_chan *fsl_chan;
41 - if (dma_spec->args_count != 3)
42 + if (dma_spec->args_count != 4)
45 mutex_lock(&fsl_edma3->fsl_edma3_mutex);
46 @@ -701,6 +706,7 @@ static struct dma_chan *fsl_edma3_xlate(
47 chan->device->privatecnt++;
48 fsl_chan->priority = dma_spec->args[1];
49 fsl_chan->is_rxchan = dma_spec->args[2];
50 + fsl_chan->is_remote = dma_spec->args[3];
51 mutex_unlock(&fsl_edma3->fsl_edma3_mutex);