[PATCH 09/20] ata: pdata_pxa: migrate over to dmaengine usage
Arnd Bergmann
arnd at arndb.de
Wed Aug 7 11:59:03 EDT 2013
On Wednesday 07 August 2013, Daniel Mack wrote:
> + dma_cap_zero(mask);
> + dma_cap_set(DMA_SLAVE, mask);
> +
> + data->dma_channel =
> + dma_request_slave_channel_compat(mask, mmp_pdma_filter_fn,
> + &pdata->dma_dreq, &pdev->dev,
> + "data");
> + if (data->dma_channel == NULL)
> return -EBUSY;
Here and in other drivers, you hardwire the mmp_pdma_filter_fn pointer, which creates
an explicit module dependency to the dmaengine driver, which should not be there
when booting with DT.
You can avoid that by open-coding the dma_request_slave_channel_compat() function:
data->dma_channel = dma_request_slave_channel(&pdev->dev, "data");
if (IS_ENABLED(CONFIG_ATAGS) && !data->dma_channel && pdata)
data->dma_channel = dma_request_channel(mask, mmp_pdma_filter_fn,
&pdata->dma_dreq);
Arnd
More information about the linux-arm-kernel
mailing list