brcm63xx: add preliminary support for 3.13
[openwrt.git] / target / linux / brcm63xx / patches-3.13 / 322-MIPS-BCM63XX-populate-irq_-stat-mask-_addr-for-secon.patch
1 From 842f213228e6fc9fd6cca01ab5128623112aa7a9 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Thu, 25 Apr 2013 00:31:29 +0200
4 Subject: [PATCH 33/53] MIPS: BCM63XX: populate irq_{stat,mask}_addr for second
5  pin
6
7 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
8 ---
9  arch/mips/bcm63xx/irq.c | 18 ++++++++++++++++++
10  1 file changed, 18 insertions(+)
11
12 --- a/arch/mips/bcm63xx/irq.c
13 +++ b/arch/mips/bcm63xx/irq.c
14 @@ -342,11 +342,15 @@ static void bcm63xx_init_irq(void)
15  
16         irq_stat_addr[0] = bcm63xx_regset_address(RSET_PERF);
17         irq_mask_addr[0] = bcm63xx_regset_address(RSET_PERF);
18 +       irq_stat_addr[1] = bcm63xx_regset_address(RSET_PERF);
19 +       irq_mask_addr[1] = bcm63xx_regset_address(RSET_PERF);
20  
21         switch (bcm63xx_get_cpu_id()) {
22         case BCM3368_CPU_ID:
23                 irq_stat_addr[0] += PERF_IRQSTAT_3368_REG;
24                 irq_mask_addr[0] += PERF_IRQMASK_3368_REG;
25 +               irq_stat_addr[1] = 0;
26 +               irq_stat_addr[1] = 0;
27                 irq_bits = 32;
28                 ext_irq_count = 4;
29                 ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
30 @@ -354,6 +358,8 @@ static void bcm63xx_init_irq(void)
31         case BCM6328_CPU_ID:
32                 irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0);
33                 irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0);
34 +               irq_stat_addr[1] += PERF_IRQSTAT_6328_REG(1);
35 +               irq_stat_addr[1] += PERF_IRQMASK_6328_REG(1);
36                 irq_bits = 64;
37                 ext_irq_count = 4;
38                 is_ext_irq_cascaded = 1;
39 @@ -364,6 +370,8 @@ static void bcm63xx_init_irq(void)
40         case BCM6338_CPU_ID:
41                 irq_stat_addr[0] += PERF_IRQSTAT_6338_REG;
42                 irq_mask_addr[0] += PERF_IRQMASK_6338_REG;
43 +               irq_stat_addr[1] = 0;
44 +               irq_mask_addr[1] = 0;
45                 irq_bits = 32;
46                 ext_irq_count = 4;
47                 ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
48 @@ -371,6 +379,8 @@ static void bcm63xx_init_irq(void)
49         case BCM6345_CPU_ID:
50                 irq_stat_addr[0] += PERF_IRQSTAT_6345_REG;
51                 irq_mask_addr[0] += PERF_IRQMASK_6345_REG;
52 +               irq_stat_addr[1] = 0;
53 +               irq_mask_addr[1] = 0;
54                 irq_bits = 32;
55                 ext_irq_count = 4;
56                 ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
57 @@ -378,6 +388,8 @@ static void bcm63xx_init_irq(void)
58         case BCM6348_CPU_ID:
59                 irq_stat_addr[0] += PERF_IRQSTAT_6348_REG;
60                 irq_mask_addr[0] += PERF_IRQMASK_6348_REG;
61 +               irq_stat_addr[1] = 0;
62 +               irq_mask_addr[1] = 0;
63                 irq_bits = 32;
64                 ext_irq_count = 4;
65                 ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6348;
66 @@ -385,6 +397,8 @@ static void bcm63xx_init_irq(void)
67         case BCM6358_CPU_ID:
68                 irq_stat_addr[0] += PERF_IRQSTAT_6358_REG(0);
69                 irq_mask_addr[0] += PERF_IRQMASK_6358_REG(0);
70 +               irq_stat_addr[1] += PERF_IRQSTAT_6358_REG(1);
71 +               irq_mask_addr[1] += PERF_IRQMASK_6358_REG(1);
72                 irq_bits = 32;
73                 ext_irq_count = 4;
74                 is_ext_irq_cascaded = 1;
75 @@ -395,6 +409,8 @@ static void bcm63xx_init_irq(void)
76         case BCM6362_CPU_ID:
77                 irq_stat_addr[0] += PERF_IRQSTAT_6362_REG(0);
78                 irq_mask_addr[0] += PERF_IRQMASK_6362_REG(0);
79 +               irq_stat_addr[1] += PERF_IRQSTAT_6362_REG(1);
80 +               irq_mask_addr[1] += PERF_IRQMASK_6362_REG(1);
81                 irq_bits = 64;
82                 ext_irq_count = 4;
83                 is_ext_irq_cascaded = 1;
84 @@ -405,6 +421,8 @@ static void bcm63xx_init_irq(void)
85         case BCM6368_CPU_ID:
86                 irq_stat_addr[0] += PERF_IRQSTAT_6368_REG(0);
87                 irq_mask_addr[0] += PERF_IRQMASK_6368_REG(0);
88 +               irq_stat_addr[1] += PERF_IRQSTAT_6368_REG(1);
89 +               irq_mask_addr[1] += PERF_IRQMASK_6368_REG(1);
90                 irq_bits = 64;
91                 ext_irq_count = 6;
92                 is_ext_irq_cascaded = 1;