[PATCH v2 2/2] dmaengine: Add Arm DMA-350 driver

Jonathan Cameron Jonathan.Cameron at huawei.com
Thu Apr 17 10:07:22 PDT 2025


On Wed, 12 Mar 2025 12:05:10 +0000
Robin Murphy <robin.murphy at arm.com> wrote:

> Add an initial driver for the Arm Corelink DMA-350 controller, to
> support basic mem-to-mem async_tx. The design here leaves room for more
> fun things like peripheral support and scatter-gather chaining to come
> in future.
> 
> Signed-off-by: Robin Murphy <robin.murphy at arm.com>
> ---
> v2:
>  - Fix build warnings
>  - Limit retries for reading live residue
Drive by review as I was curious...

Few things inline but it's been too long since I last looked
at a DMA driver to give a detailed review.

Jonathan

> +
> +static int d350_probe(struct platform_device *pdev)
> +{



> +
> +	platform_set_drvdata(pdev, dmac);
If you used the managed form of register, I don't think you need this?
> +
> +	ret = dma_async_device_register(&dmac->dma);

This is pretty noisy on most non -ENOMEM errors anyway. Is it worth another
layer of error print?

> +	if (ret)
> +		return dev_err_probe(dev, ret, "Failed to register DMA device\n");
> +
> +	return 0;
> +}
> +
> +static void d350_remove(struct platform_device *pdev)
> +{
> +	struct d350 *dmac = platform_get_drvdata(pdev);
> +
> +	dma_async_device_unregister(&dmac->dma);

dmaenginem_async_device_register() and get rid of remove.

J



> +}





More information about the linux-arm-kernel mailing list