Skip to content

Commit

Permalink
dw_dmac: utilize slave_id to pass request line
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Vinod Koul committed Sep 14, 2012
1 parent f1a7757 commit 8fccc5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8fccc5b

Please sign in to comment.