Skip to contentSkip to conversation

dt-bindings: interrupt-controller: fsl,ls-extirq: workaround wrong interrupt-map number

PATCH Superseded Frank Li 2 participants 2 messages Oct 2, 2024 – Oct 3, 2024

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: interrupt-controller: fsl,ls-extirq: workaround wrong interrupt-map number

The driver(drivers/irqchip/irq-ls-extirq.c) have not use standard DT function function to parser interrupt-map. So it doesn't consider '#address-size' in parent interrupt controller, such as GIC.

When dt-binding verify interrupt-map, item data matrix is spitted at incorrect position. So cause below warning:

arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: interrupt-controller@14:
interrupt-map: [[0, 0, 1, 0, 0, 4, 1, 0], [1, 0, 1, 4, 2, 0, 1, 0], ... is too short

Reduce minItems to workaround this warning.

---
 .../bindings/interrupt-controller/fsl,ls-extirq.yaml     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.yaml +8 -1
index 199b34fdbefc4..b52abfd3e19d4 100644
@@ -85,10 +85,17 @@ allOf:
               - fsl,ls1088a-extirq
               - fsl,ls2080a-extirq
               - fsl,lx2160a-extirq
+# The driver(drivers/irqchip/irq-ls-extirq.c) have not use standard DT
+# function function to parser interrupt-map. So it doesn't consider
+# '#address-size' in parent interrupt controller, such as GIC.
+#
+# When  dt-binding verify interrupt-map, item data matrix is spitted at
+# incorrect position. Reduce minItems to workaround this problem.
+
     then:
       properties:
         interrupt-map:
-          minItems: 12
+          minItems: 8
           maxItems: 12
         interrupt-map-mask:
           items:
Signature · 1 line
2.34.1
#1 lore raw
Quoted 2 lines · Frank Li

The driver(drivers/irqchip/irq-ls-extirq.c) have not use standard DT function function to parser interrupt-map. So it doesn't consider

Double 'function'.

Quoted 26 lines

'#address-size' in parent interrupt controller, such as GIC.

When dt-binding verify interrupt-map, item data matrix is spitted at incorrect position. So cause below warning:

arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dtb: interrupt-controller@14:
interrupt-map: [[0, 0, 1, 0, 0, 4, 1, 0], [1, 0, 1, 4, 2, 0, 1, 0], ... is too short

Reduce minItems to workaround this warning.

---
 .../bindings/interrupt-controller/fsl,ls-extirq.yaml     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.yaml +2 -0
index 199b34fdbefc4..b52abfd3e19d4 100644
@@ -85,10 +85,17 @@ allOf:
               - fsl,ls1088a-extirq
               - fsl,ls2080a-extirq
               - fsl,lx2160a-extirq
+# The driver(drivers/irqchip/irq-ls-extirq.c) have not use standard DT
+# function function to parser interrupt-map. So it doesn't consider

Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.yaml allOf: · line 98

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/fsl,ls-extirq.yaml +6 -1
+# '#address-size' in parent interrupt controller, such as GIC.
+#
+# When  dt-binding verify interrupt-map, item data matrix is spitted at
+# incorrect position. Reduce minItems to workaround this problem.
+
     then:
       properties:
         interrupt-map:
-          minItems: 12
+          minItems: 8

This should be restricted to compatibles in that driver, not to all. I assume that driver won't be corrected here because it would break the ABI, thus probably maxItems should be 8 as well.

Best regards,
Krzysztof