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

Stephen Warren swarren at wwwdotorg.org
Wed Mar 21 02:38:55 EST 2012


On 03/20/2012 04:13 AM, 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.

> +++ b/Documentation/devicetree/bindings/dma/dma.txt

> +* DMA client
> +
> +Client drivers should specify the DMA request property using a phandle to
> +the controller. If needed, the DMA request identity on that controller is then
> +added followed by optional request specifications.
> +
> +Required property:
> +    - dma-request: List of phandle + dma-request + request specifications,
> +      one group per request "line".

Should the property name be plural, i.e. "dma-requests"? For PWM I
believe we settled on "pwms" not "pwm", and that was for consistency
with other bindings like interrupts and GPIOs.


More information about the devicetree-discuss mailing list