diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-06-15 11:10:43 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-06-15 11:10:43 +0000 |
commit | d6b78c826aa67fb04e34c69c1b41eed843462bab (patch) | |
tree | 102d04a2411b6f3ee965584c0676d017fb7b54fe /target/linux/brcm-2.4/files | |
parent | ec81fa9d4e8175468d96fd7d23548f2ed6b32315 (diff) | |
download | upstream-d6b78c826aa67fb04e34c69c1b41eed843462bab.tar.gz upstream-d6b78c826aa67fb04e34c69c1b41eed843462bab.tar.bz2 upstream-d6b78c826aa67fb04e34c69c1b41eed843462bab.zip |
(5/6) bcm57xx: bcm4785 incomplete reboot
I noticed my wrt350n would not reliably reboot after entering
the reboot command. I found this code in the source for the
wrt600n. It corrects the problem, and the wrt350n reboots
reliably now.
Signed-off-by: Ben Pfountz <netprince (at) vt (dot) edu>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11470 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm-2.4/files')
-rw-r--r-- | target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c b/target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c index 00c4d9054c..89e48236b0 100644 --- a/target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c +++ b/target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c @@ -49,6 +49,7 @@ #include <osl.h> #include <sbutils.h> #include <bcmnvram.h> +#include <bcmdevs.h> #include <sbhndmips.h> #include <hndmips.h> #include <trxhdr.h> @@ -89,9 +90,21 @@ bcm947xx_machine_restart(char *command) { printk("Please stand by while rebooting the system...\n"); + if (sb_chip(sbh) == BCM4785_CHIP_ID) + MTC0(C0_BROADCOM, 4, (1 << 22)); + /* Set the watchdog timer to reset immediately */ __cli(); sb_watchdog(sbh, 1); + + if (sb_chip(sbh) == BCM4785_CHIP_ID) { + __asm__ __volatile__( + ".set\tmips3\n\t" + "sync\n\t" + "wait\n\t" + ".set\tmips0"); + } + while (1); } |