ARM: IMX: fix ability to use pcie interrupt-map
Subsystems (5)
cover ARM: IMX: fix ability to use pcie interrupt-map
The #address-cells of the arm-cortext-a9 gic in the imx pcie host controller node is invalid which breaks the ability to user interrupt-map for legacy pci interrupts.
Tim Harvey (2):
ARM: DT: fix gic interrupt controller documentation
ARM: dts: imx: fix invalid #address-cells value
Documentation/devicetree/bindings/arm/gic.txt | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.2
PATCH 1/2 ARM: DT: fix gic interrupt controller documentation
When using interrupt-maps, the size of a map entry is #address-cells +
#interrupt-cells for the parent interrupt controller. For the ARM GIC
address-cells should be 0 as this is not used.
This patch fixes the example by correctly specifying #address-cells = 0.
--- Documentation/devicetree/bindings/arm/gic.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/gic.txt +1 -1
@@ -55,7 +55,7 @@ Example: intc: interrupt-controller at fff11000 { compatible = "arm,cortex-a9-gic"; #interrupt-cells = <3>; - #address-cells = <1>; + #address-cells = <0>; interrupt-controller; reg = <0xfff11000 0x1000>, <0xfff10100 0x100>;
Signature · 1 line
1.8.3.2
PATCH 1/2 ARM: DT: fix gic interrupt controller documentation
Quoted 5 lines · Tim Harvey
When using interrupt-maps, the size of a map entry is #address-cells +
#interrupt-cells for the parent interrupt controller. For the ARM GIC
address-cells should be 0 as this is not used.This patch fixes the example by correctly specifying #address-cells = 0.
If the #address-cells property is required (well, or even optional...) in the node, shouldn't it be included in the list of required/optional properties above, and not solely included in the example?
PATCH 1/2 ARM: DT: fix gic interrupt controller documentation
Quoted 10 lines · Stephen Warren
Quoted 5 lines · Tim Harvey
When using interrupt-maps, the size of a map entry is #address-cells +
#interrupt-cells for the parent interrupt controller. For the ARM GIC
address-cells should be 0 as this is not used.This patch fixes the example by correctly specifying #address-cells = 0.
If the #address-cells property is required (well, or even optional...) in the node, shouldn't it be included in the list of required/optional properties above, and not solely included in the example?
AFAIK, #address-cells = 0 is the same as not including a #address-cells at all.
Omitting entirely is what other interrupt-controller bindings are doing, so I'd just drop mention of #address-cells completely.
Jason
PATCH 1/2 ARM: DT: fix gic interrupt controller documentation
Quoted 12 lines · Jason Gunthorpe
Quoted 10 lines · Stephen Warren
Quoted 5 lines · Tim Harvey
When using interrupt-maps, the size of a map entry is #address-cells +
#interrupt-cells for the parent interrupt controller. For the ARM GIC
address-cells should be 0 as this is not used.This patch fixes the example by correctly specifying #address-cells = 0.
If the #address-cells property is required (well, or even optional...) in the node, shouldn't it be included in the list of required/optional properties above, and not solely included in the example?
Quoted 7 lines
AFAIK, #address-cells = 0 is the same as not including a #address-cells at all.
Omitting entirely is what other interrupt-controller bindings are doing, so I'd just drop mention of #address-cells completely.
Jason
Jason / Stephen,
Yes, it does indeed default to 0 if not specified. For arm-gic it would appear #address-cells must be 0, so should we remove all places its set explicitly to 0 in dts as wel as the example in Documentation/devicetree/bindings?
Looking through arch/arm/boot/dts I'm seeing other dts configs using 'arm,cortex-a9-gic' which I'm guessing are equally as wrong as the imx6 situation:
- arch/arm/boot/dts/highbank.dts
- arch/arm/boot/dts/sh73a0.dtsi
I'm also seeing a number of places where its set explicitly to 0:
- Documentation/devicetree/bindings/arm/gic.txt
- Documentation/devicetree/bindings/arm/vexpress.txt
- arch/arm/boot/dts/bcm11351.dtsi
- arch/arm/boot/dts/hi3620.dtsi
- arch/arm/boot/dts/imx6qdl.dtsi
- arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
If I extend this search to the other compatible gic interrupt controllers implemented in drivers/irqchip/irq-gic.c (arm,cortex-a15-gic, qcom,msm-8660-qgic, qcom,msm-qgic2) I find even more examples where #address-cells is set explicitly to 0 or to 1 (and I would believe a value of 1 is invalid, just as it is in my case).
I'm happy to broaden my patch, but I certainly want to make sure I'm doing the right thing with it, as I don't have the ability to test all the other devicetree configs and am by no means a devicetree expert.
Recommendations?
Tim
PATCH 1/2 ARM: DT: fix gic interrupt controller documentation
Quoted 49 lines · Tim Harvey
Quoted 12 lines · Jason Gunthorpe
Quoted 10 lines · Stephen Warren
Quoted 5 lines · Tim Harvey
When using interrupt-maps, the size of a map entry is #address-cells +
#interrupt-cells for the parent interrupt controller. For the ARM GIC
address-cells should be 0 as this is not used.This patch fixes the example by correctly specifying #address-cells = 0.
If the #address-cells property is required (well, or even optional...) in the node, shouldn't it be included in the list of required/optional properties above, and not solely included in the example?
Quoted 7 lines
AFAIK, #address-cells = 0 is the same as not including a #address-cells at all.
Omitting entirely is what other interrupt-controller bindings are doing, so I'd just drop mention of #address-cells completely.
Jason
Jason / Stephen,
Yes, it does indeed default to 0 if not specified. For arm-gic it would appear #address-cells must be 0, so should we remove all places its set explicitly to 0 in dts as wel as the example in
Documentation/devicetree/bindings?Looking through
arch/arm/boot/dtsI'm seeing other dts configs using 'arm,cortex-a9-gic' which I'm guessing are equally as wrong as the imx6 situation:
-arch/arm/boot/dts/highbank.dts
-arch/arm/boot/dts/sh73a0.dtsiI'm also seeing a number of places where its set explicitly to 0:
-Documentation/devicetree/bindings/arm/gic.txt
-Documentation/devicetree/bindings/arm/vexpress.txt
-arch/arm/boot/dts/bcm11351.dtsi
-arch/arm/boot/dts/hi3620.dtsi
-arch/arm/boot/dts/imx6qdl.dtsi
-arch/arm/boot/dts/vexpress-v2p-ca15_a7.dtsIf I extend this search to the other compatible gic interrupt controllers implemented in
drivers/irqchip/irq-gic.c(arm,cortex-a15-gic, qcom,msm-8660-qgic, qcom,msm-qgic2) I find even more examples where #address-cells is set explicitly to 0 or to 1 (and I would believe a value of 1 is invalid, just as it is in my case).
Quoted 5 lines
I'm happy to broaden my patch, but I certainly want to make sure I'm doing the right thing with it, as I don't have the ability to test all the other devicetree configs and am by no means a devicetree expert.
Recommendations?
Copy Rob, who might want to comment a bit.
My understanding is that #address-cells and #size-cells are only valid for a node that may have child nodes. Will gic node possibly get any child node?
Shawn
PATCH 1/2 ARM: DT: fix gic interrupt controller documentation
In reply to Jason GunthorpeQuoted 12 lines · Jason Gunthorpe
Quoted 10 lines · Stephen Warren
Quoted 5 lines · Tim Harvey
When using interrupt-maps, the size of a map entry is #address-cells +
#interrupt-cells for the parent interrupt controller. For the ARM GIC
address-cells should be 0 as this is not used.This patch fixes the example by correctly specifying #address-cells = 0.
If the #address-cells property is required (well, or even optional...) in the node, shouldn't it be included in the list of required/optional properties above, and not solely included in the example?
Quoted 5 lines
AFAIK, #address-cells = 0 is the same as not including a #address-cells at all.
Omitting entirely is what other interrupt-controller bindings are doing, so I'd just drop mention of #address-cells completely.
Correct. Just drop it.
g.
PATCH 2/2 ARM: dts: imx: fix invalid #address-cells value
In reply to Tim HarveyThe invalid value of #address-cells in the imx6 pcie host controller node causes of_irq_parse_raw() to incorrectly advance through an interrupt-map table of more than one interrupt.
This patch resolves this issue and allows proper interrupt mapping for an imx6 pcie host connected to a P2P bridge when using legacy interrupts.
--- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl.dtsi +1 -1
@@ -49,7 +49,7 @@ intc: interrupt-controller at 00a01000 { compatible = "arm,cortex-a9-gic"; #interrupt-cells = <3>; - #address-cells = <1>; + #address-cells = <0>; #size-cells = <1>; interrupt-controller; reg = <0x00a01000 0x1000>,
Signature · 1 line
1.8.3.2
PATCH 2/2 ARM: dts: imx: fix invalid #address-cells value
Quoted 34 lines · Tim Harvey
The invalid value of #address-cells in the imx6 pcie host controller node causes
of_irq_parse_raw()to incorrectly advance through an interrupt-map table of more than one interrupt.This patch resolves this issue and allows proper interrupt mapping for an imx6 pcie host connected to a P2P bridge when using legacy interrupts.
Signed-off-by Tim Harvey <[email protected]>Cc Jason Gunthorpe <[email protected]>Cc Jingoo Han <[email protected]>Cc Lucas Stach <[email protected]>Cc Mark Rutland <[email protected]>Cc linux-samsung-soc <[email protected]>Cc Richard Zhu <[email protected]>Cc Sascha Hauer <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Stephen Warren <[email protected]>Cc Bjorn Helgaas <[email protected]>Cc Simon Horman <[email protected]>Cc Thierry Reding <[email protected]>Cc Ben Dooks <[email protected]>Cc linux-tegra <[email protected]>Cc Kukjin Kim <[email protected]>Cc Shawn Guo <[email protected]>Cc Grant Likely <[email protected]>--- arch/arm/boot/dts/imx6qdl.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/imx6qdl.dtsi +0
-0
arch/arm/boot/dts/imx6qdl.dtsi line 53
Quoted 6 lines
arch/arm/boot/dts/imx6qdl.dtsi +1
-1@@ -49,7 +49,7 @@ intc: interrupt-controller@00a01000 { compatible = "arm,cortex-a9-gic"; #interrupt-cells = <3>; - #address-cells = <1>; + #address-cells = <0>; #size-cells = <1>;
So we should probably just drop both #address-cells and #size-cells? If so, please help patch imx6sl.dtsi as well.
Shawn
Quoted 12 lines
arch/arm/boot/dts/imx6qdl.dtsi +0
-0interrupt-controller; reg = <0x00a01000 0x1000>,Signature · 7 lines
1.8.3.2 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel