From: Koichiro Den <den@valinux.co.jp>
To: vkoul@kernel.org, mani@kernel.org, Frank.Li@nxp.com,
jingoohan1@gmail.com, lpieralisi@kernel.org,
kwilczynski@kernel.org, robh@kernel.org, bhelgaas@google.com
Cc: dmaengine@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/7] dmaengine: Add hw_id to dma_slave_caps
Date: Tue, 27 Jan 2026 12:34:14 +0900 [thread overview]
Message-ID: <20260127033420.3460579-2-den@valinux.co.jp> (raw)
In-Reply-To: <20260127033420.3460579-1-den@valinux.co.jp>
Remote DMA users may need to map or otherwise correlate DMA resources on
a per-hardware-channel basis (e.g. DWC EP eDMA linked-list windows).
However, struct dma_chan does not expose a provider-defined hardware
channel identifier.
Add an optional dma_slave_caps.hw_id field to allow DMA engine drivers
to report a provider-specific hardware channel identifier to clients.
Initialize the field to -1 in dma_get_slave_caps() so drivers that do
not populate it continue to behave as before.
Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
drivers/dma/dmaengine.c | 1 +
include/linux/dmaengine.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index ca13cd39330b..b544eb99359d 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -603,6 +603,7 @@ int dma_get_slave_caps(struct dma_chan *chan, struct dma_slave_caps *caps)
caps->cmd_pause = !!device->device_pause;
caps->cmd_resume = !!device->device_resume;
caps->cmd_terminate = !!device->device_terminate_all;
+ caps->hw_id = -1;
/*
* DMA engine device might be configured with non-uniformly
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 99efe2b9b4ea..71bc2674567f 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -507,6 +507,7 @@ enum dma_residue_granularity {
* @residue_granularity: granularity of the reported transfer residue
* @descriptor_reuse: if a descriptor can be reused by client and
* resubmitted multiple times
+ * @hw_id: provider-specific hardware channel identifier (-1 if unknown)
*/
struct dma_slave_caps {
u32 src_addr_widths;
@@ -520,6 +521,7 @@ struct dma_slave_caps {
bool cmd_terminate;
enum dma_residue_granularity residue_granularity;
bool descriptor_reuse;
+ int hw_id;
};
static inline const char *dma_chan_name(struct dma_chan *chan)
--
2.51.0
next prev parent reply other threads:[~2026-01-27 3:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 3:34 [PATCH v2 0/7] dmaengine: dw-edma, PCI: dwc: Enable remote use of integrated DesignWare eDMA Koichiro Den
2026-01-27 3:34 ` Koichiro Den [this message]
2026-01-27 3:34 ` [PATCH v2 2/7] dmaengine: dw-edma: Report channel hw_id in dma_slave_caps Koichiro Den
2026-01-27 3:34 ` [PATCH v2 3/7] dmaengine: dw-edma: Add per-channel interrupt routing control Koichiro Den
2026-01-27 3:34 ` [PATCH v2 4/7] dmaengine: dw-edma: Poll completion when local IRQ handling is disabled Koichiro Den
2026-01-27 3:34 ` [PATCH v2 5/7] dmaengine: dw-edma: Add notify-only channels support Koichiro Den
2026-01-27 3:34 ` [PATCH v2 6/7] PCI: dwc: Add helper to query integrated dw-edma register window Koichiro Den
2026-01-27 3:34 ` [PATCH v2 7/7] PCI: dwc: Add helper to query integrated dw-edma linked-list region Koichiro Den
2026-01-28 15:48 ` Frank Li
2026-01-28 16:25 ` Koichiro Den
2026-01-29 3:42 ` Frank Li
2026-01-30 7:16 ` Koichiro Den
2026-01-30 15:07 ` Frank Li
2026-01-30 17:27 ` Koichiro Den
2026-02-01 2:32 ` [PATCH v2 0/7] dmaengine: dw-edma, PCI: dwc: Enable remote use of integrated DesignWare eDMA Koichiro Den
2026-02-02 16:59 ` Frank Li
2026-02-03 1:59 ` Koichiro Den
2026-02-03 17:26 ` Frank Li
2026-02-04 7:27 ` Koichiro Den
2026-02-04 16:17 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260127033420.3460579-2-den@valinux.co.jp \
--to=den@valinux.co.jp \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=dmaengine@vger.kernel.org \
--cc=jingoohan1@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®