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>
diff -urN target.old/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c
target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c
--- target.old/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c 2008-06-03
12:44:50.000000000 -0400
+++ target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c 2008-06-03
12:45:45.000000000 -0400
@@ -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 @@
{
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);
}
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel