Thread (1 message) 1 message, 1 author, 2013-01-29

[PATCH 1/5] dmaengine: dw_dmac: move to generic DMA binding

From: andriy.shevchenko@linux.intel.com (Andy Shevchenko)
Date: 2013-01-29 11:14:24
Also in: linux-devicetree

On Tue, 2013-01-29 at 16:27 +0530, Viresh Kumar wrote: 
On 29 January 2013 16:24, Andy Shevchenko
[off-list ref] wrote:
quoted
On Tue, 2013-01-29 at 16:19 +0530, Viresh Kumar wrote:
quoted
if (DMA_TO_DEV)
       // dest is periph
       fargs.cfg_hi = be32_to_cpup(dma_spec->args+0) << 11;
else if (DEV_TO_DMA)
       // src is periph
       fargs.cfg_hi = be32_to_cpup(dma_spec->args+0) << 7;
We have macros for such shifts.

drivers/dma/dw_dmac.c:187:   cfghi = DWC_CFGH_DST_PER(...
drivers/dma/dw_dmac.c:189:   cfghi = DWC_CFGH_SRC_PER(...
I am getting older now, bad memory :)
I grepped into drivers/dma/dw_dmac_regs.h and left include/linux/dw_dmac.h :(
Moreover the excerpt I showed from dw_dmac.c is the same piece of code
you wrote above as a sample.


-- 
Andy Shevchenko [off-list ref]
Intel Finland Oy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help