Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org,
	devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	vkoul@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v3 7/7] arm64: dts: imx95: convert eDMA to per-channel child nodes
Date: Mon, 02 Nov 2026 07:00:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-192991@kernel.org> (raw)
In-Reply-To: <20261102-edma-iommu-v3-v3-7-9d0e62a954eb@Example.Com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: imx95: edma2 child nodes break fsl_edma_probe() on imx95-navq
--

commit 4788f1a45cc4009b4772c28b9de4641ae62aa052
Author: Peng Fan <peng.fan@nxp.com>

arm64: dts: imx95: convert eDMA to per-channel child nodes

This commit converts the edma2 and edma3 nodes in imx95.dtsi from flat
interrupt arrays on the parent node to 64 per-channel child nodes with
individual reg and interrupts properties.

> diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi
> index d20c2498b9aa2..64570703ce6cb 100644
> --- a/arch/arm64/boot/dts/freescale/imx95.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx95.dtsi
> @@ -635,148 +635,666 @@ edma2: dma-controller@42000000 {
>  				compatible = "fsl,imx95-edma5";
>  				reg = <0x42000000 0x210000>;
>  				#dma-cells = <3>;
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges;
>  				dma-channels = <64>;
>  				/* channels 0 and 1 reserved for V2X fast hash */
>  				dma-channel-mask = <0x3>;

[ ... ]

> +				dma-channel@42100000 {
> +					reg = <0x42100000 0x8000>;
> +					interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
> +				};

[Severity: High]
Will adding all 64 enabled dma-channel child nodes under edma2 cause
fsl_edma_probe() to fail on arch/arm64/boot/dts/freescale/imx95-navq.dts?

In arch/arm64/boot/dts/freescale/imx95-navq.dts, &edma2 overrides
dma-channels to 30 while inheriting all 64 enabled child nodes from
imx95.dtsi:

    &edma2 {
        /* channels 30-63 owned by M7 */
        dma-channels = <30>;
    };

Previously, with a flat interrupts array on the parent node,
fsl_edma3_irq_init() only iterated up to fsl_edma->n_chans (30) and ignored
the remaining entries.

With child nodes present, fsl_edma_probe() sets fsl_edma->n_chans = 30 and
calls fsl_edma_configure_chan_from_dt(), which iterates over every available
child node via for_each_available_child_of_node(). When it reaches
dma-channel@42100000 (channel 30), fsl_edma_child_to_chan_id() rejects it:

drivers/dma/fsl-edma-main.c:fsl_edma_child_to_chan_id() {
    ...
    ch_id = div64_u64(child_res.start - chan_base, chan_size);
    if (ch_id >= fsl_edma->n_chans)
        return -EINVAL;
    ...
}

fsl_edma_configure_chan_from_dt() then returns -EINVAL and aborts probing
edma2 altogether:

drivers/dma/fsl-edma-main.c:fsl_edma_configure_chan_from_dt() {
    ...
    for_each_available_child_of_node(np, child) {
        ch_id = fsl_edma_child_to_chan_id(pdev, fsl_edma, child,
                          &parent_res);
        if (ch_id < 0) {
            dev_err(&pdev->dev, "invalid channel in %pOFn\n", child);
            of_node_put(child);
            return -EINVAL;
        }
    ...
}

Should imx95-navq.dts reserve channels 30-63 via dma-channel-mask (or
disable those child nodes) so that edma2 still probes?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261102-edma-iommu-v3-v3-0-9d0e62a954eb@Example.Com?part=7

      reply	other threads:[~2026-11-02  7:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  6:49 [PATCH v3 0/7] dmaengine: add DMA channel bus and fsl-edma per-channel IOMMU support Peng Fan (OSS)
2026-11-02  6:49 ` [PATCH v3 1/7] dmaengine: fsl-edma: unregister channels before vchan cleanup Peng Fan (OSS)
2026-11-02  6:49 ` [PATCH v3 2/7] dmaengine: add a bus for DMA channel devices Peng Fan (OSS)
2026-11-02  7:02   ` sashiko-bot
2026-11-02  6:49 ` [PATCH v3 3/7] iommu: register the DMA channel bus for IOMMU notifications Peng Fan (OSS)
2026-11-02  7:03   ` sashiko-bot
2026-11-02  6:49 ` [PATCH v3 4/7] dmaengine: move channel devices to the DMA channel bus Peng Fan (OSS)
2026-11-02  6:49 ` [PATCH v3 5/7] dt-bindings: dma: fsl,edma: add per-channel child node support Peng Fan (OSS)
2026-11-02  6:50 ` [PATCH v3 6/7] dmaengine: fsl-edma: support per-channel DT child nodes Peng Fan (OSS)
2026-11-02  7:10   ` sashiko-bot
2026-11-03  8:24   ` kernel test robot
2026-11-03 14:01   ` kernel test robot
2026-11-02  6:50 ` [PATCH v3 7/7] arm64: dts: imx95: convert eDMA to per-channel " Peng Fan (OSS)
2026-11-02  7:00   ` sashiko-bot [this message]

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=sashiko-outbox-192991@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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