Currently, the dma350 driver assumes all channels are available to
linux, this may not be true on some platforms, so it's possible no
irq(s) for the unavailable channel(s). What's more, the available
channels may not be continuous. To handle this case, we'd better
get the irq of each channel by name.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
Documentation/devicetree/bindings/dma/arm,dma-350.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml
index 429f682f15d8..94752516e51a 100644
--- a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml
+++ b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml
@@ -32,6 +32,10 @@ properties:
- description: Channel 6 interrupt
- description: Channel 7 interrupt
+ interrupt-names:
+ minItems: 1
+ maxItems: 8
+
"#dma-cells":
const: 1
description: The cell is the trigger input number
@@ -40,5 +44,6 @@ required:
- compatible
- reg
- interrupts
+ - interrupt-names
unevaluatedProperties: false
--
2.50.0
On 2025-08-23 4:40 pm, Jisheng Zhang wrote: > Currently, the dma350 driver assumes all channels are available to > linux, No, it doesn't - the CH_CFG_HAS_CMDLINK check is designed to safely skip channels reserved for Secure world (or that don't exist due to an FVP bug...), since their CH_BUILDCFG1 will as zero. > this may not be true on some platforms, so it's possible no > irq(s) for the unavailable channel(s). What's more, the available > channels may not be continuous. To handle this case, we'd better > get the irq of each channel by name. Unless you're suggesting these channels physically do not have their IRQs wired up to anything at all, what's wrong with describing the hardware in DT? Linux won't request IRQs for channels it isn't actually using, and nor should any other reasonable DT consumer - precisely because channels *can* be arbitrarily taken by the Secure world, and that can be entirely dynamic based on firmware configuration even for a single hardware platform. And even in the weird case that some channel literally has no IRQ, my thought was we'd just have a placeholder entry in the array, such that attempting to request it would fail. Thanks, Robin. > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > --- > Documentation/devicetree/bindings/dma/arm,dma-350.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > index 429f682f15d8..94752516e51a 100644 > --- a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > +++ b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > @@ -32,6 +32,10 @@ properties: > - description: Channel 6 interrupt > - description: Channel 7 interrupt > > + interrupt-names: > + minItems: 1 > + maxItems: 8 > + > "#dma-cells": > const: 1 > description: The cell is the trigger input number > @@ -40,5 +44,6 @@ required: > - compatible > - reg > - interrupts > + - interrupt-names > > unevaluatedProperties: false
On 23/08/2025 17:40, Jisheng Zhang wrote: > Currently, the dma350 driver assumes all channels are available to > linux, this may not be true on some platforms, so it's possible no > irq(s) for the unavailable channel(s). What's more, the available > channels may not be continuous. To handle this case, we'd better > get the irq of each channel by name. You did not solve the actual problem - binding still lists the interrupts in specific order. > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > --- > Documentation/devicetree/bindings/dma/arm,dma-350.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > index 429f682f15d8..94752516e51a 100644 > --- a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > +++ b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > @@ -32,6 +32,10 @@ properties: > - description: Channel 6 interrupt > - description: Channel 7 interrupt > > + interrupt-names: > + minItems: 1 > + maxItems: 8 You need to list the items. > + > "#dma-cells": > const: 1 > description: The cell is the trigger input number > @@ -40,5 +44,6 @@ required: > - compatible > - reg > - interrupts > + - interrupt-names That's ABI break, so no. Best regards, Krzysztof
On Sat, Aug 23, 2025 at 06:09:22PM +0200, Krzysztof Kozlowski wrote: > On 23/08/2025 17:40, Jisheng Zhang wrote: > > Currently, the dma350 driver assumes all channels are available to > > linux, this may not be true on some platforms, so it's possible no > > irq(s) for the unavailable channel(s). What's more, the available > > channels may not be continuous. To handle this case, we'd better > > get the irq of each channel by name. > > You did not solve the actual problem - binding still lists the > interrupts in specific order. > > > > > Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > > --- > > Documentation/devicetree/bindings/dma/arm,dma-350.yaml | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > > index 429f682f15d8..94752516e51a 100644 > > --- a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > > +++ b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > > @@ -32,6 +32,10 @@ properties: > > - description: Channel 6 interrupt > > - description: Channel 7 interrupt > > > > + interrupt-names: > > + minItems: 1 > > + maxItems: 8 > > You need to list the items. I found in current dt-bindings, not all doc list the items. So is it changed now? > > > > + > > "#dma-cells": > > const: 1 > > description: The cell is the trigger input number > > @@ -40,5 +44,6 @@ required: > > - compatible > > - reg > > - interrupts > > + - interrupt-names > > That's ABI break, so no. If there's no users of arm-dma350 in upstream so far, is ABI break allowed? The reason is simple: to simplify the driver to parse the irq. Thanks
On 24/08/2025 11:49, Jisheng Zhang wrote: > On Sat, Aug 23, 2025 at 06:09:22PM +0200, Krzysztof Kozlowski wrote: >> On 23/08/2025 17:40, Jisheng Zhang wrote: >>> Currently, the dma350 driver assumes all channels are available to >>> linux, this may not be true on some platforms, so it's possible no >>> irq(s) for the unavailable channel(s). What's more, the available >>> channels may not be continuous. To handle this case, we'd better >>> get the irq of each channel by name. >> >> You did not solve the actual problem - binding still lists the >> interrupts in specific order. >> >>> >>> Signed-off-by: Jisheng Zhang <jszhang@kernel.org> >>> --- >>> Documentation/devicetree/bindings/dma/arm,dma-350.yaml | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml >>> index 429f682f15d8..94752516e51a 100644 >>> --- a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml >>> +++ b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml >>> @@ -32,6 +32,10 @@ properties: >>> - description: Channel 6 interrupt >>> - description: Channel 7 interrupt >>> >>> + interrupt-names: >>> + minItems: 1 >>> + maxItems: 8 >> >> You need to list the items. > > I found in current dt-bindings, not all doc list the items. So is it > changed now? Close to impossible... :) But even if you found 1% of bindings with mistake, please kindly take 99% of bindings as the example. Not 1%. Which bindings were these with undefined names? > >> >> >>> + >>> "#dma-cells": >>> const: 1 >>> description: The cell is the trigger input number >>> @@ -40,5 +44,6 @@ required: >>> - compatible >>> - reg >>> - interrupts >>> + - interrupt-names >> >> That's ABI break, so no. > > If there's no users of arm-dma350 in upstream so far, is ABI break > allowed? The reason is simple: to simplify the driver to parse > the irq. You can try to make your case - see writing bindings. But what about all out of tree users? All other open source projects? All other kernels? I really do not ask about anything new here - that's a policy since long time. Best regards, Krzysztof
On Sun, Aug 24, 2025 at 12:30:40PM +0200, Krzysztof Kozlowski wrote: > On 24/08/2025 11:49, Jisheng Zhang wrote: > > On Sat, Aug 23, 2025 at 06:09:22PM +0200, Krzysztof Kozlowski wrote: > >> On 23/08/2025 17:40, Jisheng Zhang wrote: > >>> Currently, the dma350 driver assumes all channels are available to > >>> linux, this may not be true on some platforms, so it's possible no > >>> irq(s) for the unavailable channel(s). What's more, the available > >>> channels may not be continuous. To handle this case, we'd better > >>> get the irq of each channel by name. > >> > >> You did not solve the actual problem - binding still lists the > >> interrupts in specific order. > >> > >>> > >>> Signed-off-by: Jisheng Zhang <jszhang@kernel.org> > >>> --- > >>> Documentation/devicetree/bindings/dma/arm,dma-350.yaml | 5 +++++ > >>> 1 file changed, 5 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > >>> index 429f682f15d8..94752516e51a 100644 > >>> --- a/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > >>> +++ b/Documentation/devicetree/bindings/dma/arm,dma-350.yaml > >>> @@ -32,6 +32,10 @@ properties: > >>> - description: Channel 6 interrupt > >>> - description: Channel 7 interrupt > >>> > >>> + interrupt-names: > >>> + minItems: 1 > >>> + maxItems: 8 > >> > >> You need to list the items. > > > > I found in current dt-bindings, not all doc list the items. So is it > > changed now? > > Close to impossible... :) But even if you found 1% of bindings with > mistake, please kindly take 99% of bindings as the example. Not 1%. > > Which bindings were these with undefined names? > > > > >> > >> > >>> + > >>> "#dma-cells": > >>> const: 1 > >>> description: The cell is the trigger input number > >>> @@ -40,5 +44,6 @@ required: > >>> - compatible > >>> - reg > >>> - interrupts > >>> + - interrupt-names > >> > >> That's ABI break, so no. > > > > If there's no users of arm-dma350 in upstream so far, is ABI break > > allowed? The reason is simple: to simplify the driver to parse > > the irq. > > You can try to make your case - see writing bindings. But what about all > out of tree users? All other open source projects? All other kernels? I make sense! I will address your comments in v2. Before that, let me collect some review comments, especially from dmaengine maintainer and Robin. Thanks > really do not ask about anything new here - that's a policy since long time.
© 2016 - 2025 Red Hat, Inc.