patch-2.4.5 linux/include/asm-arm/arch-ebsa285/system.h
Next file: linux/include/asm-arm/arch-l7200/keyboard.h
Previous file: linux/include/asm-alpha/system.h
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Wed May 16 15:25:16 2001
- Orig file:
v2.4.4/linux/include/asm-arm/arch-ebsa285/system.h
- Orig date:
Mon Sep 18 15:15:23 2000
diff -u --recursive --new-file v2.4.4/linux/include/asm-arm/arch-ebsa285/system.h linux/include/asm-arm/arch-ebsa285/system.h
@@ -63,14 +63,24 @@
*/
outb(0xc4, 0x338);
} else {
- /* To reboot, we set up the 21285 watchdog and
- * enable it. We then wait for it to timeout.
+ /*
+ * Force the watchdog to do a CPU reset.
+ *
+ * After making sure that the watchdog is disabled
+ * (so we can change the timer registers) we first
+ * enable the timer to autoreload itself. Next, the
+ * timer interval is set really short and any
+ * current interrupt request is cleared (so we can
+ * see an edge transition). Finally, TIMER4 is
+ * enabled as the watchdog.
*/
- *CSR_TIMER4_LOAD = 0x8000;
+ *CSR_SA110_CNTL &= ~(1 << 13);
*CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |
TIMER_CNTL_AUTORELOAD |
TIMER_CNTL_DIV16;
- *CSR_SA110_CNTL |= 1 << 13;
+ *CSR_TIMER4_LOAD = 0x2;
+ *CSR_TIMER4_CLR = 0;
+ *CSR_SA110_CNTL |= (1 << 13);
}
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)