aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2012-09-03 06:46:19 -0400
committerVinod Koul <vinod.koul@linux.intel.com>2012-09-13 22:59:46 -0400
commit8fccc5bfd7f83fd321db42bcad36e2d9fe13d65b (patch)
tree2b3e2169e830b6b1d02cf361323e22b72ad123a5 /drivers/dma/dw_dmac.c
parentf1a7757008b810217b2380d01b740244f21c09bd (diff)
dw_dmac: utilize slave_id to pass request line
There is slave_id field in the generic slave config structure that is dedicated for the uniq slave number. In our case we have the request lines wired to the certain hardware. Therefore the number of the request line is uniq and could be used as slave_id. It allows us in some cases to drop out the usage of the custom slave config structure. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r--drivers/dma/dw_dmac.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 4f4ff1337cac..efbd16a296f1 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -177,6 +177,11 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
177 177
178 cfghi = dws->cfg_hi; 178 cfghi = dws->cfg_hi;
179 cfglo |= dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK; 179 cfglo |= dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK;
180 } else {
181 if (dwc->dma_sconfig.direction == DMA_MEM_TO_DEV)
182 cfghi = DWC_CFGH_DST_PER(dwc->dma_sconfig.slave_id);
183 else if (dwc->dma_sconfig.direction == DMA_DEV_TO_MEM)
184 cfghi = DWC_CFGH_SRC_PER(dwc->dma_sconfig.slave_id);
180 } 185 }
181 186
182 channel_writel(dwc, CFG_LO, cfglo); 187 channel_writel(dwc, CFG_LO, cfglo);