On Mon, May 19, 2014 at 10:02 PM, Arnd Bergmann <arnd@xxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html