Re: [PATCH] of: Add generic device tree DMA helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 17 March 2012, Grant Likely wrote:
> On Thu, 15 Mar 2012 09:26:52 +0000, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> wrote:
> > On Thu, Mar 15, 2012 at 09:22:06AM +0000, Arnd Bergmann wrote:
> > > On Thursday 15 March 2012, Nicolas Ferre wrote:
> > > > Add some basic helpers to retrieve a DMA controller device_node and the
> > > > DMA request specifications. By making DMA controllers register a generic
> > > > translation function, we allow the management of any type of DMA requests
> > > > specification.
> > > > The void * output of an of_dma_xlate() function that will be implemented
> > > > by the DMA controller can carry any type of "dma-request" argument.
> > > > 
> > > > The DMA client will search its associated DMA controller in the list and
> > > > call the registered of_dam_xlate() function to retrieve the request values.
> > > > 
> > > > One simple xlate function is provided for the "single number" type of
> > > > request binding.
> > > > 
> > > > This implementation is independent from dmaengine so it can also be used
> > > > by legacy drivers.
> > > > 
> > > > For legacy reason another API will export the DMA request number into a
> > > > Linux resource of type IORESOURCE_DMA.
> > > 
> > > This looks very good. I missed the first version of this patch, but was
> > > thinking of very similar bindings.
> > 
> > There's one issue which is concerning me - when we switch OMAP to use
> > DMA engine, it won't use numeric stuff anymore but the DMA engine way
> > of requesting a channel (match function + data).
> > 
> > How does that fit into this scheme?
> 
> Not well as the current patch set stands.  The xlate function doesn't return
> any context for the dma channel number that it returns, so the driver cannot
> figure out which DMA controller to use if there are multiple.

Shouldn't that be part of the data returned by xlate? I was under the impression
that this would be the data that you would pass into dma_request_channel, together
with a filter function that find the instance from the data.

That's why I suggested adding another helper function that would provide a
generic filter function for the dt binding doing just that.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux