[PATCH v8 3/3] dmaengine: zynqmp_dma: Add per-channel reset support

Pandey, Radhey Shyam radheys at amd.com
Fri Dec 4 06:51:49 PST 2026


On 12/4/2026 2:28 PM, Golla Nagendra wrote:
> Versal Gen2 and Versal Net expose a dedicated reset line per ZDMA
> channel. Trigger a reset pulse during probe using
> device_reset_optional().
> 
> The binding requires resets for Versal Gen2 and Versal Net and forbids
> them for the legacy xlnx,zynqmp-dma-1.0 compatible. Since the same probe
> path serves all three, use device_reset_optional() to reset the channel
> when a reset is described while allowing legacy devices to continue
> probing.
> 
> Remove the generic dev_err_probe() from the zynqmp_dma_probe()
> channel-probe failure path to avoid duplicate error reporting and to
> preserve the original deferred-probe reason set at the actual failure
> site in zynqmp_dma_chan_probe().
> 
> Signed-off-by: Golla Nagendra <nagendra.golla at amd.com>

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey at amd.com>
Thanks!
> ---
>   drivers/dma/xilinx/zynqmp_dma.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
> index 3b7dfa53f972..044e853f7724 100644
> --- a/drivers/dma/xilinx/zynqmp_dma.c
> +++ b/drivers/dma/xilinx/zynqmp_dma.c
> @@ -19,6 +19,7 @@
>   #include <linux/clk.h>
>   #include <linux/io-64-nonatomic-lo-hi.h>
>   #include <linux/pm_runtime.h>
> +#include <linux/reset.h>
>   
>   #include "../dmaengine.h"
>   
> @@ -930,6 +931,11 @@ static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev,
>   	if (IS_ERR(chan->regs))
>   		return PTR_ERR(chan->regs);
>   
> +	err = device_reset_optional(&pdev->dev);
> +	if (err)
> +		return dev_err_probe(&pdev->dev, err,
> +					     "failed to reset channel\n");
> +
>   	chan->bus_width = ZYNQMP_DMA_BUS_WIDTH_64;
>   	chan->dst_burst_len = ZYNQMP_DMA_MAX_DST_BURST_LEN;
>   	chan->src_burst_len = ZYNQMP_DMA_MAX_SRC_BURST_LEN;
> @@ -1140,10 +1146,8 @@ static int zynqmp_dma_probe(struct platform_device *pdev)
>   	}
>   
>   	ret = zynqmp_dma_chan_probe(zdev, pdev);
> -	if (ret) {
> -		dev_err_probe(&pdev->dev, ret, "Probing channel failed\n");
> +	if (ret)
>   		goto free_chan_resources;
> -	}
>   
>   	p->dst_addr_widths = BIT(zdev->chan->bus_width / 8);
>   	p->src_addr_widths = BIT(zdev->chan->bus_width / 8);
> 




More information about the linux-arm-kernel mailing list