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

Viresh Kumar viresh.kumar at linaro.org
Tue Jan 29 21:04:21 EST 2013


On 29 January 2013 21:51, Arnd Bergmann <arnd at arndb.de> wrote:
> On Tuesday 29 January 2013, Viresh Kumar wrote:
>> On 29 January 2013 19:01, Arnd Bergmann <arnd at arndb.de> wrote:
>> > Ah, good. So I guess the "dma-requests" property should actually
>> > be "16" then.
>>
>> yes, even i was checking on that separately :)
>
> Actually, I just discovered something odd in the
> arch/arm/mach-spear/spear13xx-dma.h file that gets removed
> in the last patch: there, we define request numbers up to
> 32, e.g.
>
> -       SPEAR1310_DMA_REQ_UART2_RX = 14,
> -       SPEAR1310_DMA_REQ_UART2_TX = 15,
> -       SPEAR1310_DMA_REQ_UART5_RX = 16,
> -       SPEAR1310_DMA_REQ_UART5_TX = 17,
>
> What is the meaning of this, if the maximum request number is 15?

I knew you will come to this :)
So, the hardware is like: there are 16 request line slots per master, a
platform can choose to connect same or separate devices to these.

So, these are really 16 per master.

> Ok. Would it be enough to have only one master and one request
> field in the DT dma descriptor then, and have the code figure
> whether to use it as source or destination, based on the
> configuration? Which one should come first? Since you have
> multiple masters per controller, and multiple requests per
> master, it sounds like the cleanest descriptor form would
> be
>
>         <controller master request>;
>
> Or possibly
>
>         <controller master request direction>;
>
> if the direction needs to be known at the time the channel
> is requested.

Its better to keep masters as is. So, that we can use appropriate
masters for peripheral and memory to make the transfer fast.



More information about the linux-arm-kernel mailing list