Hi, On Mon, Jan 28, 2013 at 8:28 PM, Arnd Bergmann <arnd@xxxxxxxx> wrote: > On Friday 18 January 2013, Padmavathi Venna wrote: >> +struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec, >> + struct of_dma *ofdma) >> +{ >> + int count = dma_spec->args_count; >> + struct of_dma_filter_info *info = ofdma->of_dma_data; >> + >> + if (!info || !info->filter_fn) >> + return NULL; >> + >> + if (count != 1) >> + return NULL; >> + >> + return dma_request_channel(info->dma_cap, info->filter_fn, dma_spec); >> +} >> +EXPORT_SYMBOL_GPL(of_dma_pl330_xlate); > > It seems a little sad that we still have to use dma_request_channel() > to implement this, when that function will go off searching all channels > and pass them tino the filter, which then has to look for the device node > and match it with each channel. We already know the controller and should > just be able to get a channel for it, although I don't exactly know how > that is done. > > Further, your function is almost identical to the of_dma_simple_xlate > function. Can't you use that one instead? of_dma_simple_xlate is just passing the dma channel number to the filter function. But I also need to compare against device node as my requested channel can belong to any of the available dma controller on SoC. So I implemented a xlate which passes the whole dma_spec. Thanks for reviewing the patches. Regards Padma > > Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html