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

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Jan 29 09:26:15 EST 2013


On Tue, Jan 29, 2013 at 03:45:40PM +0200, Andy Shevchenko wrote:
> On Tue, 2013-01-29 at 13:31 +0000, Arnd Bergmann wrote: 
> > On Tuesday 29 January 2013, Viresh Kumar wrote:
> > > You can still keep fargs as is and just fill them as:
> > > 
> > >        fargs.cfg_lo = 0;
> > > 
> > > 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;
> > > 
> > > The field size is 4 bits.
> > 
> > Ah, good. So I guess the "dma-requests" property should actually
> > be "16" then.
> > 
> > Does this mean that an implicit zero request line means memory?
> 
> No, it doesn't.
> When dma is doing mem2mem transfers the request line field is ignored by
> the hw.

Memory to memory transfers are dealt with using a totally different API
to the slave API.  Look at the rest of the DMA engine API to see how it's
used - any channel is selected with a DMA_MEMCPY capability.

(IMHO, the MEM2MEM transfer type against the slave API should never have
been permitted.)



More information about the linux-arm-kernel mailing list