From: Jun Guo <jun.guo@cixtech.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
peter.chen@cixtech.com, fugang.duan@cixtech.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
ychuang3@nuvoton.com, schung@nuvoton.com, robin.murphy@arm.com
Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, cix-kernel-upstream@cixtech.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] dma: arm-dma350: add support for shared interrupt mode
Date: Mon, 17 Nov 2025 19:37:16 +0800 [thread overview]
Message-ID: <22f66fbf-8637-4826-a2e6-69d16333c2b8@cixtech.com> (raw)
In-Reply-To: <eb9eae64-f414-4b04-9a10-4dd8a9088e96@kernel.org>
On 11/17/2025 2:13 PM, Krzysztof Kozlowski wrote:
> On 17/11/2025 02:59, Jun Guo wrote:
>> - The arm dma350 controller's hardware implementation varies: some
> That's not a list. Look at git history to learn how to write expected
> commit messages.
>
>> designs dedicate a separate interrupt line for each channel, while
>> others have all channels sharing a single interrupt.This patch adds
>> support for the hardware design where all DMA channels share a
>> single interrupt.
>>
>> Signed-off-by: Jun Guo<jun.guo@cixtech.com>
>> ---
>> drivers/dma/ar
>
>
>> @@ -526,7 +593,7 @@ static void d350_free_chan_resources(struct dma_chan *chan)
>> static int d350_probe(struct platform_device *pdev)
>> {
>> struct device *dev = &pdev->dev;
>> - struct d350 *dmac;
>> + struct d350 *dmac = NULL;
>> void __iomem *base;
>> u32 reg;
>> int ret, nchan, dw, aw, r, p;
>> @@ -556,6 +623,7 @@ static int d350_probe(struct platform_device *pdev)
>> return -ENOMEM;
>>
>> dmac->nchan = nchan;
>> + dmac->base = base;
>>
>> reg = readl_relaxed(base + DMAINFO + DMA_BUILDCFG1);
>> dmac->nreq = FIELD_GET(DMA_CFG_NUM_TRIGGER_IN, reg);
>> @@ -582,6 +650,26 @@ static int d350_probe(struct platform_device *pdev)
>> dmac->dma.device_issue_pending = d350_issue_pending;
>> INIT_LIST_HEAD(&dmac->dma.channels);
>>
>> + /* Cix Sky1 has a common host IRQ for all its channels. */
>> + if (of_device_is_compatible(pdev->dev.of_node, "cix,sky1-dma-350")) {
> No, see further
>
>> + int host_irq = platform_get_irq(pdev, 0);
>> +
>> + if (host_irq < 0)
>> + return dev_err_probe(dev, host_irq,
>> + "Failed to get IRQ\n");
>> +
>> + ret = devm_request_irq(&pdev->dev, host_irq, d350_global_irq,
>> + IRQF_SHARED, DRIVER_NAME, dmac);
>> + if (ret)
>> + return dev_err_probe(
>> + dev, ret,
>> + "Failed to request the combined IRQ %d\n",
>> + host_irq);
>> +
>> + /* Combined Non-Secure Channel Interrupt Enable */
>> + writel_relaxed(INTREN_ANYCHINTR_EN, dmac->base + DMANSECCTRL);
>> + }
>> +
>> /* Would be nice to have per-channel caps for this... */
>> memset = true;
>> for (int i = 0; i < nchan; i++) {
>> @@ -595,10 +683,16 @@ static int d350_probe(struct platform_device *pdev)
>> dev_warn(dev, "No command link support on channel %d\n", i);
>> continue;
>> }
>> - dch->irq = platform_get_irq(pdev, i);
>> - if (dch->irq < 0)
>> - return dev_err_probe(dev, dch->irq,
>> - "Failed to get IRQ for channel %d\n", i);
>> +
>> + if (!of_device_is_compatible(pdev->dev.of_node,
>> + "cix,sky1-dma-350")) {
> No, use driver match data for that. Sprinkling compatibles everywhere
> does not scale.
>
I have another question: by "driver match data", are you referring to
the data variable in the struct of_device_id?
> Also, this is in contrary with the binding, which did not say your
> device has no interrupts.
I need to clarify here: the issue with my chip platform is not the lack
of interrupts, but that all DMA channels share a single interrupt. The
current driver, however, defaults to assigning an individual interrupt
for each DMA channel.
next prev parent reply other threads:[~2025-11-17 11:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 1:59 [PATCH 0/3] dmaengine: " Jun Guo
2025-11-17 1:59 ` [PATCH 1/3] dt-bindings: dma: arm-dma350: update DT binding docs Jun Guo
2025-11-17 6:11 ` Krzysztof Kozlowski
2025-11-17 7:07 ` Jun Guo
2025-11-17 7:11 ` Krzysztof Kozlowski
2025-11-17 7:13 ` Krzysztof Kozlowski
2025-11-17 12:51 ` Jun Guo
2025-11-17 13:29 ` Krzysztof Kozlowski
2025-11-18 1:37 ` Jun Guo
2025-11-17 1:59 ` [PATCH 2/3] dma: arm-dma350: add support for shared interrupt mode Jun Guo
2025-11-17 6:13 ` Krzysztof Kozlowski
2025-11-17 7:18 ` Jun Guo
2025-11-17 11:37 ` Jun Guo [this message]
2025-11-17 11:44 ` Krzysztof Kozlowski
2025-11-17 11:52 ` Jun Guo
2025-11-17 11:32 ` Robin Murphy
2025-11-17 11:57 ` Jun Guo
2025-11-17 1:59 ` [PATCH 3/3] arm64: dts: cix: add DT nodes for DMA Jun Guo
2025-11-17 6:14 ` Krzysztof Kozlowski
2025-11-17 7:08 ` Jun Guo
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=22f66fbf-8637-4826-a2e6-69d16333c2b8@cixtech.com \
--to=jun.guo@cixtech.com \
--cc=cix-kernel-upstream@cixtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=fugang.duan@cixtech.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.chen@cixtech.com \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=schung@nuvoton.com \
--cc=vkoul@kernel.org \
--cc=ychuang3@nuvoton.com \
/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®