diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-08-18 16:01:16 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-08-19 07:30:47 -0400 |
commit | 2727cab25a26a0e65e8d9d247ba5a8e9b3e552c7 (patch) | |
tree | 6ae71661690c3a8ed8ef88a4481b10ac75000ba8 | |
parent | 92d01f71c86a02c6e224b3e74f2368def3be1dfb (diff) |
MIPS: BCM47XX: Fix reboot problem on BCM4705/BCM4785
This adds some code based on code from the Broadcom GPL tar to fix the
reboot problems on BCM4705/BCM4785. I tried rebooting my device for ~10
times and have never seen a problem. This reverts the changes in the
previous commit and adds the real fix as suggested by RafaĆ.
Setting bit 22 in Reg 22, sel 4 puts the BIU (Bus Interface Unit) into
async mode.
The previous commit was 316cad5c1d4daee998cd1f83ccdb437f6f20d45c [MIPS:
BCM47XX: make reboot more relaiable]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: jogo@openwrt.org
Cc: zajec5@gmail.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7545/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/bcm47xx/setup.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c index 2b63e7e7d3d3..ad439c273003 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c | |||
@@ -59,12 +59,21 @@ static void bcm47xx_machine_restart(char *command) | |||
59 | switch (bcm47xx_bus_type) { | 59 | switch (bcm47xx_bus_type) { |
60 | #ifdef CONFIG_BCM47XX_SSB | 60 | #ifdef CONFIG_BCM47XX_SSB |
61 | case BCM47XX_BUS_TYPE_SSB: | 61 | case BCM47XX_BUS_TYPE_SSB: |
62 | ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 3); | 62 | if (bcm47xx_bus.ssb.chip_id == 0x4785) |
63 | write_c0_diag4(1 << 22); | ||
64 | ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 1); | ||
65 | if (bcm47xx_bus.ssb.chip_id == 0x4785) { | ||
66 | __asm__ __volatile__( | ||
67 | ".set\tmips3\n\t" | ||
68 | "sync\n\t" | ||
69 | "wait\n\t" | ||
70 | ".set\tmips0"); | ||
71 | } | ||
63 | break; | 72 | break; |
64 | #endif | 73 | #endif |
65 | #ifdef CONFIG_BCM47XX_BCMA | 74 | #ifdef CONFIG_BCM47XX_BCMA |
66 | case BCM47XX_BUS_TYPE_BCMA: | 75 | case BCM47XX_BUS_TYPE_BCMA: |
67 | bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 3); | 76 | bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 1); |
68 | break; | 77 | break; |
69 | #endif | 78 | #endif |
70 | } | 79 | } |