ARM: integrator: get the LM interrupts from DT
Subsystems (3)
PATCH 1/6 ARM: integrator: get the LM interrupts from DT
The OF/DT boot path needs to get the LM (Logical Module) IRQs from the device tree for coherency. This augments the DT syscon node to contain these IRQs and alter the DT LM code to get them from there.
--- Documentation/devicetree/bindings/arm/arm-boards | 20 ++++++++++++++++++++ arch/arm/boot/dts/integratorap.dts | 3 +++ arch/arm/mach-integrator/integrator_ap.c | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/arm-boards +20 -0
@@ -9,9 +9,29 @@ Required properties (in root node): FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. +Required nodes: + In the root node the Integrator/CP must have a /cpcon node pointing to the CP control registers, and the Integrator/AP must have a /syscon node pointing to the Integrator/AP system controller. +The AP syscon node must include the logical module interrupts, +example: + +/dts-v1/; +/include/ "integrator.dtsi" + +/ { + model = "ARM Integrator/AP"; + compatible = "arm,integrator-ap"; + + syscon { + /* AP system controller registers */ + reg = <0x11000000 0x100>; + interrupt-parent = <&pic>; + /* These are the logical module IRQs */ + interrupts = <9 10 11 12>; + }; +}; ARM Versatile Application and Platform Baseboards
arch/arm/boot/dts/integratorap.dts +3 -0
@@ -21,6 +21,9 @@ syscon { /* AP system controller registers */ reg = <0x11000000 0x100>; + interrupt-parent = <&pic>; + /* These are the logical module IRQs */ + interrupts = <9 10 11 12>; }; timer0: timer at 13000000 {
arch/arm/mach-integrator/integrator_ap.c +1 -1
@@ -541,7 +541,7 @@ static void __init ap_init_of(void) lmdev->resource.start =0xc0000000 +0x10000000 * i; lmdev->resource.end = lmdev->resource.start +0x0fffffff ; lmdev->resource.flags =IORESOURCE_MEM ; - lmdev->irq =IRQ_AP_EXPINT0 + i; + lmdev->irq =irq_of_parse_and_map (syscon, i); lmdev->id = i;lm_device_register (lmdev);
Signature · 1 line
1.8.3.1
PATCH 1/6 ARM: integrator: get the LM interrupts from DT
[adding devicetree to Cc]
Hi Linus,
I missed this because I was neither Cc'd directly or through the devicetree list. Please Cc devicetree at vger.kernel.org for DT patches in future.
Quoted 17 lines · Linus Walleij
The OF/DT boot path needs to get the LM (Logical Module) IRQs from the device tree for coherency. This augments the DT syscon node to contain these IRQs and alter the DT LM code to get them from there.
Signed-off-by Linus Walleij <[email protected]>--- Documentation/devicetree/bindings/arm/arm-boards | 20 ++++++++++++++++++++ arch/arm/boot/dts/integratorap.dts | 3 +++ arch/arm/mach-integrator/integrator_ap.c | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/arm/arm-boards +0
-0
Documentation/devicetree/bindings/arm/arm-boards Required properties (in root node): · line 17
Quoted 9 lines
Documentation/devicetree/bindings/arm/arm-boards +3
-0@@ -9,9 +9,29 @@ Required properties (in root node): FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. +Required nodes: + In the root node the Integrator/CP must have a /cpcon node pointing to the CP control registers, and the Integrator/AP must have a /syscon node pointing to the Integrator/AP system controller. +The AP syscon node must include the logical module interrupts,
s/logical/logic/ (and below)
Quoted 5 lines
Documentation/devicetree/bindings/arm/arm-boards +5
-0+example: + +/dts-v1/; +/include/ "integrator.dtsi" +
Documentation/devicetree/bindings/arm/arm-boards Required properties (in root node): · line 32
Quoted 10 lines
Documentation/devicetree/bindings/arm/arm-boards +10
-0+/ { + model = "ARM Integrator/AP"; + compatible = "arm,integrator-ap"; + + syscon { + /* AP system controller registers */ + reg = <0x11000000 0x100>; + interrupt-parent = <&pic>; + /* These are the logical module IRQs */ + interrupts = <9 10 11 12>;
What order are these interrupts in? I assume ascending, starting at module 0, but it would be nice to state that.
Also, could you please bracket entries in lists individually? It makes it easy to read lists of composite values (interrupts, clocks, dmas), regardless of how many cells an entry takes:
interrupts = <9>, <10>, <11>, <12>;
Quoted 10 lines
Documentation/devicetree/bindings/arm/arm-boards +2
-0+ }; +}; ARM Versatile Application and Platform Baseboardsarch/arm/boot/dts/integratorap.dts +0
-0
arch/arm/boot/dts/integratorap.dts line 26
Quoted 6 lines
arch/arm/boot/dts/integratorap.dts +3
-0@@ -21,6 +21,9 @@ syscon { /* AP system controller registers */ reg = <0x11000000 0x100>; + interrupt-parent = <&pic>; + /* These are the logical module IRQs */ + interrupts = <9 10 11 12>;
Same here.
Otherwise, this looks ok to me.
Cheers,
Mark.
Quoted 25 lines
arch/arm/boot/dts/integratorap.dts +0
-0}; timer0: timer at 13000000 {arch/arm/mach-integrator/integrator_ap.c +1
-1@@ -541,7 +541,7 @@ static void __init ap_init_of(void) lmdev->resource.start =0xc0000000 +0x10000000 * i; lmdev->resource.end = lmdev->resource.start +0x0fffffff ; lmdev->resource.flags =IORESOURCE_MEM ; - lmdev->irq =IRQ_AP_EXPINT0 + i; + lmdev->irq =irq_of_parse_and_map (syscon, i); lmdev->id = i;lm_device_register (lmdev);Signature · 7 lines
1.8.3.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel