[PATCH V3 1/2] of: Add generic device tree DMA helpers

Arnd Bergmann arnd at arndb.de
Mon May 7 13:21:33 EDT 2012


On Monday 07 May 2012, Stephen Warren wrote:
> > That way dmac and client drivers using DT could do away with the filter_fn.
> > 
> > Roughly speaking (I am not very well versed with DT syntax)
> > 
> > Client Node:-
> > 
> > mmc1: mmc at 13002000 {
> >         ...
> >         dma_tx = <891>   //some platform-wide unique value
> >         dma_rx = <927>   //some platform-wide unique value
> >         ...
> >  };
> 
> I believe we specifically don't want to introduce any global concept of
> DMA channel ID, either within the kernel, or at the device tree level.

I agree.

> While we do have global interrupt and GPIO IDs within the kernel, this
> has caused problems, I think primarily due to the need to manage this
> unified namespace and allocate a single global ID for a bunch of
> different ranges of controller-specific IDs.
> 
> Within device tree, everything is always represented as an ID
> relative-to or within a particular controller, so it's easy to namespace
> things separately.

Right. Note that strictly speaking the requirement is that everything
is local to a particular namespace, which does not have to be the
device controlling the property.

For instance, we can map interrupt numbers to different controllers
using the interrupt-maps property. It is a fairly complex method,
but something similar or a somewhat simpler method could be applied
to define a namespace for dma controllers from which you can pick
a request line.

The example I've given earlier does just that.

	Arnd



More information about the linux-arm-kernel mailing list