Re: [PATCH v6 4/4] dmaengine: zynqmp_dma: Add per-channel reset support
From: Frank Li
Date: Wed Dec 02 2026 - 15:04:45 EST
On Wed, Dec 02, 2026 at 05:35:56PM +0530, 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.
>
> The binding's per-compatible reset requirements are validated by
> dtbs_check, so duplicating the compatible-specific check in the driver
> is unnecessary.
>
> Signed-off-by: Golla Nagendra <nagendra.golla@xxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> drivers/dma/xilinx/zynqmp_dma.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
> index dd6679266d3e..1fd6e668604c 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;
>
> --
> 2.43.7
>