[PATCH 0/5] dmaengine: dw-edma: Add helpers for remote eDMA use scenarios

Koichiro Den posted 5 patches 1 week, 5 days ago
drivers/dma/dmaengine.c               |   1 +
drivers/dma/dw-edma/dw-edma-core.c    | 167 +++++++++++++++++++++++---
drivers/dma/dw-edma/dw-edma-core.h    |  21 ++++
drivers/dma/dw-edma/dw-edma-v0-core.c |  26 ++--
include/linux/dma/edma.h              |  57 +++++++++
include/linux/dmaengine.h             |   2 +
6 files changed, 249 insertions(+), 25 deletions(-)
[PATCH 0/5] dmaengine: dw-edma: Add helpers for remote eDMA use scenarios
Posted by Koichiro Den 1 week, 5 days ago
This series proposes helpers for remote eDMA use cases (e.g. [1]):

  - Add an optional dma_slave_caps.hw_id field so DMA providers can expose a
    provider-defined hardware channel identifier to clients
  - Report hw_id from dw-edma
  - Introduce per-channel interrupt routing control for DesignWare EP eDMA,
    configurable via dmaengine_slave_config() by passing a small
    dw-edma-specific structure through dma_slave_config.peripheral_config /
    dma_slave_config.peripheral_size (as suggested during RFC review)
  - Add optional completion polling for channels where local IRQ handling is
    disabled
  - Add notify-only channel support for cases where the local side needs
    interrupt notification without cookie-based accounting (i.e. its peer
    perpares and submits the transaction descriptors)

Note: a companion PCI/dwc series ([2]) was posted separately to expose the
integrated eDMA register and LL windows keyed by struct pci_epc. Users can
use dma_get_slave_caps().hw_id to correlate per-channel LL regions.

Note: stm32-dma3 implements .device_caps, but it's untouched in this
series (i.e. no patch adds 'caps->hw_id = chan->id' in stm32_dma3_caps()).
When a concrete need arises, this can be addressed in a separate patch.

[1] [RFC PATCH v4 00/38] NTB transport backed by PCI EP embedded DMA
    https://lore.kernel.org/linux-pci/20260118135440.1958279-1-den@valinux.co.jp/
[2] [PATCH 0/2] PCI: dwc: Expose integrated DesignWare eDMA windows
    https://lore.kernel.org/all/20260126071550.3233631-1-den@valinux.co.jp/

Developed on dmaengine.git next:
  commit: 3c8a86ed002a ("dmaengine: xilinx: xdma: use sg_nents_for_dma()
                         helper")

Kind regards,

Koichiro Den (5):
  dmaengine: Add hw_id to dma_slave_caps
  dmaengine: dw-edma: Report channel hw_id in dma_slave_caps
  dmaengine: dw-edma: Add per-channel interrupt routing control
  dmaengine: dw-edma: Poll completion when local IRQ handling is
    disabled
  dmaengine: dw-edma: Add notify-only channels support

 drivers/dma/dmaengine.c               |   1 +
 drivers/dma/dw-edma/dw-edma-core.c    | 167 +++++++++++++++++++++++---
 drivers/dma/dw-edma/dw-edma-core.h    |  21 ++++
 drivers/dma/dw-edma/dw-edma-v0-core.c |  26 ++--
 include/linux/dma/edma.h              |  57 +++++++++
 include/linux/dmaengine.h             |   2 +
 6 files changed, 249 insertions(+), 25 deletions(-)

-- 
2.51.0