[PATCH v4 0/6] dmaengine: zynqmp_dma: Per-channel reset, IRQ guard improvements, and PM fixes

Golla Nagendra nagendra.golla at amd.com
Thu Oct 8 21:00:09 PDT 2026


This series extends the ZynqMP DMA driver with per-channel reset support
for Versal Gen2 and Versal Net, improves the runtime PM guard in the IRQ
handler, and fixes probe-time runtime PM reference handling.

Patch 1 replaces pm_runtime_resume_and_get() with a scoped
PM_RUNTIME_ACQUIRE_AUTOSUSPEND() guard for the probe-time runtime PM
reference, and adds zynqmp_dma_probe_pm_put()/_fail() helpers
so every probe error path releases the reference and gates the clocks
deterministically instead of relying on goto-based cleanup.

Patch 2 adds a pm_runtime_if_active base guard and its _try conditional
variant to pm_runtime.h, used via PM_RUNTIME_ACQUIRE_IF_ACTIVE(), so
callers such as interrupt handlers can acquire a runtime PM reference
only when the device is already active.

Patch 3 uses PM_RUNTIME_ACQUIRE_IF_ACTIVE() in zynqmp_dma_irq_handler()
to return IRQ_NONE when the device is genuinely runtime-suspended, while
falling through to normal processing when runtime PM is disabled.

Patch 4 updates the dt-binding to add the amd,versal-net-dma-1.0
compatible string and restricts the resets property per-compatible using
allOf:if:then:, making it required for Versal Gen2 and Versal Net and
explicitly absent for all other platforms.

Patch 5 adds the amd,versal-net-dma-1.0 entry to the driver match table
with a dedicated versal_net_dma_config carrying has_reset=true.

Patch 6 adds reset handling in the channel probe path, using the
has_reset field in zynqmp_dma_config to conditionally call
device_reset() on Versal Gen2 and Versal Net channels.

Changes in V4:
- Patch 1: Use PM_RUNTIME_ACQUIRE_AUTOSUSPEND() instead of
  pm_runtime_resume_and_get(), and fail probe immediately if the guard
  acquire fails. Add zynqmp_dma_probe_pm_put()/_fail()
  helpers so every error path releases the reference and gates the
  clocks without goto-based cleanup, and pair every direct
  zynqmp_dma_runtime_suspend() call with pm_runtime_set_suspended() to
  keep the runtime PM status in sync with the clocks
- Patch 2: Bypass the guard when pm_runtime_get_if_active() returns
  -EINVAL, covering disabled runtime PM and CONFIG_PM=n, so interrupt
  handlers keep servicing interrupts instead of bailing out
- Patch 3: Remove the IS_ENABLED(CONFIG_PM) condition from the guard
  error check, since patch 2 already handles disabled runtime PM and
  CONFIG_PM=n inside the guard itself
- Patch 4: Move the allOf block under the required field
  Add the new compatible string and the resets property in the example
- Patch 5: No change
- Patch 6: No change

Changes in V3:
- Patch 1: New patch - split PM usage count fix into a separate patch as
- Patch 2: New patch - add PM_RUNTIME_ACQUIRE_IF_ACTIVE() guard and its
  backing infrastructure to pm_runtime.h
- Patch 3: Use PM_RUNTIME_ACQUIRE_IF_ACTIVE() guard instead of the manual
  pm_runtime_get_if_active()/pm_runtime_put() pair from V2
- Patch 4: Use allOf:if:then: to restrict the resets property per-
  compatible with resets: false for non-matching platforms
  also expand to include amd,versal-net-dma-1.0
- Patch 5: New patch - add amd,versal-net-dma-1.0 compatible to driver
- Patch 6: Introduce has_reset flag in zynqmp_dma_config to gate the
  reset path; PM usage count fix split into patch 1/6

- Link to v3: 
-------------
  --> https://lore.kernel.org/r/20260810100452.426320-1-nagendra.golla@amd.com

Signed-off-by: Golla Nagendra <nagendra.golla at amd.com>
---
---
Golla Nagendra (5):
      dmaengine: zynqmp_dma: Use PM guard for probe-time runtime PM reference
      PM: runtime: Add pm_runtime_if_active guard and conditional variant
      dmaengine: zynqmp_dma: Guard IRQ handler against spurious interrupts
      dmaengine: zynqmp_dma: Add new compatible string for Versal Net
      dmaengine: zynqmp_dma: Add per-channel reset support

Jay Buddhabhatti (1):
      dt-bindings: dma: xlnx,zynqmp-dma: Add Versal Net compatible support

 .../bindings/dma/xilinx/xlnx,zynqmp-dma-1.0.yaml   | 34 ++++++--
 drivers/dma/xilinx/zynqmp_dma.c                    | 90 +++++++++++++++++-----
 include/linux/pm_runtime.h                         | 27 +++++++
 3 files changed, 125 insertions(+), 26 deletions(-)
---
base-commit: 2576c937f7b442df7de8e39332ff585f08b666b8
change-id: 20261008-adma-pm-fix-and-per-channel-reset-d822a344a8e6

Best regards,
-- 
Golla Nagendra <nagendra.golla at amd.com>




More information about the linux-arm-kernel mailing list