Re: [PATCH 1/4] DMA: PL330: Add xlate function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

	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


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux