summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/patches-3.18/323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch
blob: 3e718772cac384bbb2b6d45d5abb7fdd8fd8af9d (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From e3c68bbba30b212326fb69bf64b2220750dead3e Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Sun, 30 Nov 2014 20:20:30 +0100
Subject: [PATCH 20/20] MIPS: BCM63XX: wire up BCM6358's external interrupts 4
 and 5

Due to the external interrupts being non consecutive, the previous
implementation did not support them. Now that we treat both registers
as separate irq controllers, there is no such limitation anymore and
we can expose them for drivers to use.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
 arch/mips/bcm63xx/irq.c                           |    5 ++++-
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h  |    2 ++
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h |    1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

--- a/arch/mips/bcm63xx/irq.c
+++ b/arch/mips/bcm63xx/irq.c
@@ -109,11 +109,14 @@ static void bcm63xx_init_irq(void)
 		l2_width = 1;
 
 		ext_intc_bases[0] += PERF_EXTIRQ_CFG_REG_6358;
-		ext_irq_count = 4;
+		ext_intc_bases[1] += PERF_EXTIRQ_CFG_REG2_6358;
+		ext_irq_count = 6;
 		ext_irqs[0] = BCM_6358_EXT_IRQ0;
 		ext_irqs[1] = BCM_6358_EXT_IRQ1;
 		ext_irqs[2] = BCM_6358_EXT_IRQ2;
 		ext_irqs[3] = BCM_6358_EXT_IRQ3;
+		ext_irqs[4] = BCM_6358_EXT_IRQ4;
+		ext_irqs[5] = BCM_6358_EXT_IRQ5;
 		ext_shift = 4;
 		break;
 	case BCM6362_CPU_ID:
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
@@ -895,6 +895,8 @@ enum bcm63xx_irq {
 #define BCM_6358_EXT_IRQ1		(IRQ_INTERNAL_BASE + 26)
 #define BCM_6358_EXT_IRQ2		(IRQ_INTERNAL_BASE + 27)
 #define BCM_6358_EXT_IRQ3		(IRQ_INTERNAL_BASE + 28)
+#define BCM_6358_EXT_IRQ4		(IRQ_INTERNAL_BASE + 20)
+#define BCM_6358_EXT_IRQ5		(IRQ_INTERNAL_BASE + 21)
 
 /*
  * 6362 irqs
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
@@ -243,6 +243,7 @@
 #define PERF_EXTIRQ_CFG_REG_6362	0x18
 #define PERF_EXTIRQ_CFG_REG_6368	0x18
 
+#define PERF_EXTIRQ_CFG_REG2_6358	0x1c
 #define PERF_EXTIRQ_CFG_REG2_6368	0x1c
 
 /* for 6348 only */