MIPS: JZ4740: Move arch_init_irq out of arch/mips/jz4740/irq.c
authorPaul Burton <paul.burton@imgtec.com>
Sun, 24 May 2015 15:11:19 +0000 (16:11 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 21 Jun 2015 19:52:56 +0000 (21:52 +0200)
In preparation for moving the JZ4740 interrupt controller driver to
drivers/irqchip, move arch_init_irq into setup.c such that everything
remaining in irq.c is related to said JZ4740 interrupt controller.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Brian Norris <computersforpeace@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/10136/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mach-jz4740/irq.h
arch/mips/jz4740/irq.c
arch/mips/jz4740/setup.c

index df50736749c16d2860bd5e4d48b2b6f655b86eb8..5ce430218e424b634292f0a9b1da6fee6846465c 100644 (file)
@@ -54,4 +54,6 @@
 
 #define NR_IRQS (JZ4740_IRQ_ADC_BASE + 6)
 
+extern void __init jz4740_intc_init(void);
+
 #endif
index a2452bb80e1d5c6f8b0efd4003039c88debb710f..bac1f52d327ffb7b23c8ef110b02882a54828c07 100644 (file)
@@ -18,7 +18,6 @@
 #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>
@@ -78,13 +77,11 @@ static struct irqaction jz4740_cascade_action = {
        .name = "JZ4740 cascade interrupt",
 };
 
-void __init arch_init_irq(void)
+void __init jz4740_intc_init(void)
 {
        struct irq_chip_generic *gc;
        struct irq_chip_type *ct;
 
-       irqchip_init();
-
        jz_intc_base = ioremap(JZ4740_INTC_BASE_ADDR, 0x14);
 
        /* Mask all irqs */
index d6bb7a39fafe66e889b0def63d86c05b62823e0a..48087303100705c83696cb8de1f515b88165448e 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/irqchip.h>
 #include <linux/kernel.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
@@ -24,6 +25,7 @@
 #include <asm/prom.h>
 
 #include <asm/mach-jz4740/base.h>
+#include <asm/mach-jz4740/irq.h>
 
 #include "reset.h"
 
@@ -78,3 +80,9 @@ const char *get_system_type(void)
 {
        return "JZ4740";
 }
+
+void __init arch_init_irq(void)
+{
+       irqchip_init();
+       jz4740_intc_init();
+}