[PATCH] dmaengine: sirf: enable generic dt binding for dma channels

Lars-Peter Clausen lars at metafoo.de
Mon Nov 11 09:29:06 EST 2013


On 11/11/2013 10:13 AM, Barry Song wrote:
[...]
> +static struct dma_chan *of_dma_sirfsoc_xlate(struct of_phandle_args *dma_spec,
> +	struct of_dma *ofdma)
> +{
> +	struct sirfsoc_dma *sdma = ofdma->of_dma_data;
> +	struct sirfsoc_dma_filter_args fargs;
> +
> +	if (!sdma)
> +		return NULL;
> +
> +	if (dma_spec->args_count != 1)
> +		return NULL;
> +
> +	fargs.sdma = sdma;
> +	fargs.chan_id = dma_spec->args[0];
> +
> +	return dma_request_channel(sdma->cap, sirfsoc_dma_dt_filter, &fargs);
> +}

There is now the dma_get_slave_channel() function which makes it a bit
cleaner to implement this. I think you can use the k3dma driver as an example.

- Lars




More information about the linux-arm-kernel mailing list