X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/7ed9009bbdf799be5f9f1446c264b8504f483beb..796a9d1091884a07817e5c140d0ff6a0b8c76235:/target/linux/brcm-2.4/files/arch/mips/bcm947xx/setup.c 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 819a48d25..89e48236b 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 @@ -48,8 +48,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -90,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); } @@ -170,7 +182,7 @@ brcm_setup(void) char *value; /* Get global SB handle */ - sbh = sb_kattach(); + sbh = sb_kattach(SB_OSH); /* Initialize clocks and interrupts */ sb_mips_init(sbh, SBMIPS_VIRTIRQ_BASE);