1 --- a/arch/mips/bcm63xx/irq.c
2 +++ b/arch/mips/bcm63xx/irq.c
3 @@ -45,8 +45,8 @@ static void __internal_irq_unmask_64(uns
4 #define is_ext_irq_cascaded 0
5 #define ext_irq_start 0
7 -#define ext_irq_count 0
8 -#define ext_irq_cfg_reg1 0
9 +#define ext_irq_count 4
10 +#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6345
11 #define ext_irq_cfg_reg2 0
13 #ifdef CONFIG_BCM63XX_CPU_6348
14 @@ -122,11 +122,15 @@ static void bcm63xx_init_irq(void)
15 irq_stat_addr += PERF_IRQSTAT_6338_REG;
16 irq_mask_addr += PERF_IRQMASK_6338_REG;
19 + ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
22 irq_stat_addr += PERF_IRQSTAT_6345_REG;
23 irq_mask_addr += PERF_IRQMASK_6345_REG;
26 + ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
29 irq_stat_addr += PERF_IRQSTAT_6348_REG;
30 @@ -413,7 +417,8 @@ static int bcm63xx_external_irq_set_type
31 reg = bcm_perf_readl(regaddr);
34 - if (BCMCPU_IS_6348()) {
35 + switch (bcm63xx_get_cpu_id()) {
36 + case BCM6348_CPU_ID:
38 reg |= EXTIRQ_CFG_LEVELSENSE_6348(irq);
40 @@ -426,9 +431,12 @@ static int bcm63xx_external_irq_set_type
41 reg |= EXTIRQ_CFG_BOTHEDGE_6348(irq);
43 reg &= ~EXTIRQ_CFG_BOTHEDGE_6348(irq);
47 - if (BCMCPU_IS_6338() || BCMCPU_IS_6358() || BCMCPU_IS_6368()) {
48 + case BCM6338_CPU_ID:
49 + case BCM6345_CPU_ID:
50 + case BCM6358_CPU_ID:
51 + case BCM6368_CPU_ID:
53 reg |= EXTIRQ_CFG_LEVELSENSE(irq);
55 @@ -441,6 +449,9 @@ static int bcm63xx_external_irq_set_type
56 reg |= EXTIRQ_CFG_BOTHEDGE(irq);
58 reg &= ~EXTIRQ_CFG_BOTHEDGE(irq);
64 bcm_perf_writel(reg, regaddr);
65 --- a/arch/mips/bcm63xx/setup.c
66 +++ b/arch/mips/bcm63xx/setup.c
67 @@ -71,6 +71,9 @@ void bcm63xx_machine_reboot(void)
69 perf_regs[0] = PERF_EXTIRQ_CFG_REG_6338;
71 + case BCM6345_CPU_ID:
72 + perf_regs[0] = PERF_EXTIRQ_CFG_REG_6345;
75 perf_regs[0] = PERF_EXTIRQ_CFG_REG_6348;
77 @@ -80,6 +83,9 @@ void bcm63xx_machine_reboot(void)
80 for (i = 0; i < 2; i++) {
84 reg = bcm_perf_readl(perf_regs[i]);
85 if (BCMCPU_IS_6348()) {
86 reg &= ~EXTIRQ_CFG_MASK_ALL_6348;
87 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
88 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
91 /* External Interrupt Configuration register */
92 #define PERF_EXTIRQ_CFG_REG_6338 0x14
93 +#define PERF_EXTIRQ_CFG_REG_6345 0x14
94 #define PERF_EXTIRQ_CFG_REG_6348 0x14
95 #define PERF_EXTIRQ_CFG_REG_6358 0x14
96 #define PERF_EXTIRQ_CFG_REG_6368 0x18