From: Andy Shevchenko Date: Mon, 3 Sep 2012 10:46:19 +0000 (+0300) Subject: dw_dmac: utilize slave_id to pass request line X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8fccc5bfd7f83fd321db42bcad36e2d9fe13d65b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Viresh Kumar Signed-off-by: Vinod Koul --- 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) cfghi = dws->cfg_hi; cfglo |= dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK; + } else { + if (dwc->dma_sconfig.direction == DMA_MEM_TO_DEV) + cfghi = DWC_CFGH_DST_PER(dwc->dma_sconfig.slave_id); + else if (dwc->dma_sconfig.direction == DMA_DEV_TO_MEM) + cfghi = DWC_CFGH_SRC_PER(dwc->dma_sconfig.slave_id); } channel_writel(dwc, CFG_LO, cfglo);