aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm63xx/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/bcm63xx/setup.c')
-rw-r--r--arch/mips/bcm63xx/setup.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/arch/mips/bcm63xx/setup.c b/arch/mips/bcm63xx/setup.c
index 04a349928643..d209f85d87bb 100644
--- a/arch/mips/bcm63xx/setup.c
+++ b/arch/mips/bcm63xx/setup.c
@@ -63,13 +63,33 @@ static void bcm6348_a1_reboot(void)
63 63
64void bcm63xx_machine_reboot(void) 64void bcm63xx_machine_reboot(void)
65{ 65{
66 u32 reg; 66 u32 reg, perf_regs[2] = { 0, 0 };
67 unsigned int i;
67 68
68 /* mask and clear all external irq */ 69 /* mask and clear all external irq */
69 reg = bcm_perf_readl(PERF_EXTIRQ_CFG_REG); 70 switch (bcm63xx_get_cpu_id()) {
70 reg &= ~EXTIRQ_CFG_MASK_ALL; 71 case BCM6338_CPU_ID:
71 reg |= EXTIRQ_CFG_CLEAR_ALL; 72 perf_regs[0] = PERF_EXTIRQ_CFG_REG_6338;
72 bcm_perf_writel(reg, PERF_EXTIRQ_CFG_REG); 73 break;
74 case BCM6348_CPU_ID:
75 perf_regs[0] = PERF_EXTIRQ_CFG_REG_6348;
76 break;
77 case BCM6358_CPU_ID:
78 perf_regs[0] = PERF_EXTIRQ_CFG_REG_6358;
79 break;
80 }
81
82 for (i = 0; i < 2; i++) {
83 reg = bcm_perf_readl(perf_regs[i]);
84 if (BCMCPU_IS_6348()) {
85 reg &= ~EXTIRQ_CFG_MASK_ALL_6348;
86 reg |= EXTIRQ_CFG_CLEAR_ALL_6348;
87 } else {
88 reg &= ~EXTIRQ_CFG_MASK_ALL;
89 reg |= EXTIRQ_CFG_CLEAR_ALL;
90 }
91 bcm_perf_writel(reg, perf_regs[i]);
92 }
73 93
74 if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() == 0xa1)) 94 if (BCMCPU_IS_6348() && (bcm63xx_get_cpu_rev() == 0xa1))
75 bcm6348_a1_reboot(); 95 bcm6348_a1_reboot();