summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/patches-3.8/316-MIPS-BCM63XX-populate-irq_-stat-mask-_addr-for-secon.patch
blob: 094eaa88ccdadb952c053922a51e649294da31ac (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
From b14de5c78d32f8f98535a99ea56bb924beb66810 Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Thu, 25 Apr 2013 00:31:29 +0200
Subject: [PATCH 07/13] MIPS: BCM63XX: populate irq_{stat,mask}_addr for
 second CPU

Populate it for all platforms with a BMIPS4350.

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

--- a/arch/mips/bcm63xx/irq.c
+++ b/arch/mips/bcm63xx/irq.c
@@ -30,6 +30,8 @@ static void __internal_irq_unmask_64(uns
 #ifdef CONFIG_BCM63XX_CPU_6328
 #define irq_stat_reg0		PERF_IRQSTAT_6328_REG(0)
 #define irq_mask_reg0		PERF_IRQMASK_6328_REG(0)
+#define irq_stat_reg1		PERF_IRQSTAT_6328_REG(1)
+#define irq_mask_reg1		PERF_IRQMASK_6328_REG(1)
 #define irq_bits		64
 #define is_ext_irq_cascaded	1
 #define ext_irq_start		(BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE)
@@ -41,6 +43,8 @@ static void __internal_irq_unmask_64(uns
 #ifdef CONFIG_BCM63XX_CPU_6338
 #define irq_stat_reg0		PERF_IRQSTAT_6338_REG
 #define irq_mask_reg0		PERF_IRQMASK_6338_REG
+#define irq_stat_reg1		0
+#define irq_mask_reg1		0
 #define irq_bits		32
 #define is_ext_irq_cascaded	0
 #define ext_irq_start		0
@@ -52,6 +56,8 @@ static void __internal_irq_unmask_64(uns
 #ifdef CONFIG_BCM63XX_CPU_6345
 #define irq_stat_reg0		PERF_IRQSTAT_6345_REG
 #define irq_mask_reg0		PERF_IRQMASK_6345_REG
+#define irq_stat_reg1		0
+#define irq_mask_reg1		0
 #define irq_bits		32
 #define is_ext_irq_cascaded	0
 #define ext_irq_start		0
@@ -63,6 +69,8 @@ static void __internal_irq_unmask_64(uns
 #ifdef CONFIG_BCM63XX_CPU_6348
 #define irq_stat_reg0		PERF_IRQSTAT_6348_REG
 #define irq_mask_reg0		PERF_IRQMASK_6348_REG
+#define irq_stat_reg1		0
+#define irq_mask_reg1		0
 #define irq_bits		32
 #define is_ext_irq_cascaded	0
 #define ext_irq_start		0
@@ -74,6 +82,8 @@ static void __internal_irq_unmask_64(uns
 #ifdef CONFIG_BCM63XX_CPU_6358
 #define irq_stat_reg0		PERF_IRQSTAT_6358_REG(0)
 #define irq_mask_reg0		PERF_IRQMASK_6358_REG(0)
+#define irq_stat_reg1		PERF_IRQSTAT_6358_REG(1)
+#define irq_mask_reg1		PERF_IRQMASK_6358_REG(1)
 #define irq_bits		32
 #define is_ext_irq_cascaded	1
 #define ext_irq_start		(BCM_6358_EXT_IRQ0 - IRQ_INTERNAL_BASE)
@@ -85,6 +95,8 @@ static void __internal_irq_unmask_64(uns
 #ifdef CONFIG_BCM63XX_CPU_6362
 #define irq_stat_reg0		PERF_IRQSTAT_6362_REG(0)
 #define irq_mask_reg0		PERF_IRQMASK_6362_REG(0)
+#define irq_stat_reg1		PERF_IRQSTAT_6362_REG(1)
+#define irq_mask_reg1		PERF_IRQMASK_6362_REG(1)
 #define irq_bits		64
 #define is_ext_irq_cascaded	1
 #define ext_irq_start		(BCM_6362_EXT_IRQ0 - IRQ_INTERNAL_BASE)
@@ -96,6 +108,8 @@ static void __internal_irq_unmask_64(uns
 #ifdef CONFIG_BCM63XX_CPU_6368
 #define irq_stat_reg0		PERF_IRQSTAT_6368_REG(0)
 #define irq_mask_reg0		PERF_IRQMASK_6368_REG(0)
+#define irq_stat_reg1		PERF_IRQSTAT_6368_REG(1)
+#define irq_mask_reg1		PERF_IRQMASK_6368_REG(1)
 #define irq_bits		64
 #define is_ext_irq_cascaded	1
 #define ext_irq_start		(BCM_6368_EXT_IRQ0 - IRQ_INTERNAL_BASE)
@@ -117,13 +131,15 @@ static void __internal_irq_unmask_64(uns
 
 #define irq_stat_addr0	(bcm63xx_regset_address(RSET_PERF) + irq_stat_reg0)
 #define irq_mask_addr0	(bcm63xx_regset_address(RSET_PERF) + irq_mask_reg0)
+#define irq_stat_addr1	(bcm63xx_regset_address(RSET_PERF) + irq_stat_reg1)
+#define irq_mask_addr1	(bcm63xx_regset_address(RSET_PERF) + irq_mask_reg1)
 
 static inline void bcm63xx_init_irq(void)
 {
 }
 #else /* ! BCMCPU_RUNTIME_DETECT */
 
-static u32 irq_stat_addr0, irq_mask_addr0;
+static u32 irq_stat_addr0, irq_mask_addr0, irq_stat_addr1, irq_mask_addr1;
 static void (*dispatch_internal)(void);
 static int is_ext_irq_cascaded;
 static unsigned int ext_irq_count;
@@ -138,11 +154,15 @@ static void bcm63xx_init_irq(void)
 
 	irq_stat_addr0 = bcm63xx_regset_address(RSET_PERF);
 	irq_mask_addr0 = bcm63xx_regset_address(RSET_PERF);
+	irq_stat_addr1 = bcm63xx_regset_address(RSET_PERF);
+	irq_mask_addr1 = bcm63xx_regset_address(RSET_PERF);
 
 	switch (bcm63xx_get_cpu_id()) {
 	case BCM6328_CPU_ID:
 		irq_stat_addr0 += PERF_IRQSTAT_6328_REG(0);
 		irq_mask_addr0 += PERF_IRQMASK_6328_REG(0);
+		irq_stat_addr1 += PERF_IRQSTAT_6328_REG(1);
+		irq_stat_addr1 += PERF_IRQMASK_6328_REG(1);
 		irq_bits = 64;
 		ext_irq_count = 4;
 		is_ext_irq_cascaded = 1;
@@ -174,6 +194,8 @@ static void bcm63xx_init_irq(void)
 	case BCM6358_CPU_ID:
 		irq_stat_addr0 += PERF_IRQSTAT_6358_REG(0);
 		irq_mask_addr0 += PERF_IRQMASK_6358_REG(0);
+		irq_stat_addr1 += PERF_IRQSTAT_6358_REG(1);
+		irq_mask_addr1 += PERF_IRQMASK_6358_REG(1);
 		irq_bits = 32;
 		ext_irq_count = 4;
 		is_ext_irq_cascaded = 1;
@@ -184,6 +206,8 @@ static void bcm63xx_init_irq(void)
 	case BCM6362_CPU_ID:
 		irq_stat_addr0 += PERF_IRQSTAT_6362_REG(0);
 		irq_mask_addr0 += PERF_IRQMASK_6362_REG(0);
+		irq_stat_addr1 += PERF_IRQSTAT_6362_REG(1);
+		irq_mask_addr1 += PERF_IRQMASK_6362_REG(1);
 		irq_bits = 64;
 		ext_irq_count = 4;
 		is_ext_irq_cascaded = 1;
@@ -194,6 +218,8 @@ static void bcm63xx_init_irq(void)
 	case BCM6368_CPU_ID:
 		irq_stat_addr0 += PERF_IRQSTAT_6368_REG(0);
 		irq_mask_addr0 += PERF_IRQMASK_6368_REG(0);
+		irq_stat_addr1 += PERF_IRQSTAT_6368_REG(1);
+		irq_mask_addr1 += PERF_IRQMASK_6368_REG(1);
 		irq_bits = 64;
 		ext_irq_count = 6;
 		is_ext_irq_cascaded = 1;