[PATCH] s3cmci: port DMA code to dmaengine API

Vasily Khoruzhick anarsoul at gmail.com
Mon May 19 12:39:57 PDT 2014


On Mon, May 19, 2014 at 10:02 PM, Arnd Bergmann <arnd at arndb.de> wrote:

>> Well, at least s3c64xx uses resources for passing dma channel number,
>> and so did I.
>> Btw, It'll make transition to device tree a bit easier.
>
> Actually it doesn't help with the transition to DT at all, because DT
> does not use resources for DMA requests. Instead there is a
> dma_request_slave_channel() interface that gets passed a string to
> match the DT descriptor of the DMA channel. If you want to enable
> DT probing while keeping the traditional way alive, you can
> use dma_request_slave_channel_compat(), although I find it not
> much easier than open-coding it.
>
> There is one issue with dma_request_slave_channel_compat and
> dma_request_channel, which is that you need a pointer to the
> filter function. In portable drivers that pointer should get passed
> in platform_data for the non-DT case, along with the data it
> needs, because there are dma engines that need more than just
> an integer to identify a slave.
>
> For this driver, you don't have to go that far, as long as it's
> ensure that the pointer to the filter function is available to
> the driver, i.e. you can't have a built-in s3mci driver when the
> dmaengine driver is a loadable module.

I'll take a look at dma_request_slave_channel_compat(), thanks for a hint!

Regards,
Vasily



More information about the linux-arm-kernel mailing list