MIPS: JZ4740: probe CPU interrupt controller via DT
authorPaul Burton <paul.burton@imgtec.com>
Sun, 24 May 2015 22:37:42 +0000 (23:37 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 21 Jun 2015 19:52:54 +0000 (21:52 +0200)
Use the generic irqchip_init function to probe irqchip drivers using DT,
and add the appropriate node to the JZ4740 devicetree in place of the
call to mips_cpu_irq_init.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Patchwork: https://patchwork.linux-mips.org/patch/10166/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/boot/dts/ingenic/jz4740.dtsi
arch/mips/jz4740/irq.c

index c538691fcc5049a14bb1cd382bbe52b552e84782..dd3642fb924d715f6be6406add0c2db0c3f31123 100644 (file)
@@ -2,4 +2,11 @@
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "ingenic,jz4740";
+
+       cpuintc: interrupt-controller@0 {
+               #address-cells = <0>;
+               #interrupt-cells = <1>;
+               interrupt-controller;
+               compatible = "mti,cpu-interrupt-controller";
+       };
 };
index 97206b3deb9777b963bf5f47cbb0b0de6d1e5bb4..3ec9087540b4642ca2d4a3e626222ca1157344c1 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/irqchip.h>
 #include <linux/timex.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
@@ -27,7 +28,6 @@
 
 #include <asm/io.h>
 #include <asm/mipsregs.h>
-#include <asm/irq_cpu.h>
 
 #include <asm/mach-jz4740/base.h>
 #include <asm/mach-jz4740/irq.h>
@@ -84,7 +84,7 @@ void __init arch_init_irq(void)
        struct irq_chip_generic *gc;
        struct irq_chip_type *ct;
 
-       mips_cpu_irq_init();
+       irqchip_init();
 
        jz_intc_base = ioremap(JZ4740_INTC_BASE_ADDR, 0x14);