aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/patches-3.14/373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch
blob: c8c212b08f98231d92186e38a703f648f4e230ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 40c0e6e4f68ce0c759eb216b44cdfbe18de328b0 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Mon, 1 Dec 2014 00:20:07 +0100
Subject: [PATCH 5/5] MIPS: BCM63XX: register interrupt controllers through DT

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
 arch/mips/bcm63xx/irq.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--- a/arch/mips/bcm63xx/irq.c
+++ b/arch/mips/bcm63xx/irq.c
@@ -15,6 +15,8 @@
 #include <linux/irqchip.h>
 #include <linux/irqchip/irq-bcm6345-ext.h>
 #include <linux/irqchip/irq-bcm6345-periph.h>
+#include <linux/of.h>
+#include <linux/of_fdt.h>
 #include <asm/irq_cpu.h>
 #include <asm/mipsregs.h>
 #include <bcm63xx_cpu.h>
@@ -189,7 +191,17 @@ static void bcm63xx_init_irq(void)
 				      ext_shift);
 }
 
+static const struct of_device_id irqchip_of_match_mips_cpu_intc __used __section(__irqchip_of_table) = {
+	.compatible = "mti,cpu-interrupt-controller",
+	.data = mips_cpu_irq_of_init,
+};
+
 void __init arch_init_irq(void)
 {
-	bcm63xx_init_irq();
+#ifdef CONFIG_OF
+	if (initial_boot_params)
+		irqchip_init();
+	else
+#endif
+		bcm63xx_init_irq();
 }