]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: integrator: get the LM interrupts from DT
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 15 Jun 2013 21:56:32 +0000 (23:56 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 16 Oct 2013 12:09:38 +0000 (14:09 +0200)
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 <linus.walleij@linaro.org>
Documentation/devicetree/bindings/arm/arm-boards
arch/arm/boot/dts/integratorap.dts
arch/arm/mach-integrator/integrator_ap.c

index db5858e32d3f86f88c9776e80b98eddb27435131..5fdd7b9eeb522a060549af6eba00e062ee5d5b96 100644 (file)
@@ -9,9 +9,30 @@ 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 logic module interrupts, stated
+in order of module instance <module 0, module 1, module 2 ...>
+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 logic module IRQs */
+               interrupts = <9>, <10>, <11>, <12>;
+       };
+};
 
 
 ARM Versatile Application and Platform Baseboards
index b6b82eca8d1e8f2ecd2869aa90b4fd58f8da9afa..453ab0ea4d2b4bfa4aed3fb88fc75fa3d3c21729 100644 (file)
@@ -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@13000000 {
index d9e95e612fcbfaecf9855d4a39f5017d236edb6f..f5fbd8adef0cbaeede6d41eb5cd578796238f1ad 100644 (file)
@@ -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);