diff options
author | Kumar Gala <galak@freescale.com> | 2005-09-03 18:55:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:05:56 -0400 |
commit | a2f40ccd294d14e5aca464c1913e8e0d8de35fca (patch) | |
tree | d900ebdbf37656d77acf7934db40021b21d49fde /arch/ppc/kernel/traps.c | |
parent | 886b9fa49900b055e20cd98f379fda49835d1ee6 (diff) |
[PATCH] ppc32: Added support for the Book-E style Watchdog Timer
PowerPC 40x and Book-E processors support a watchdog timer at the processor
core level. The timer has implementation dependent timeout frequencies
that can be configured by software.
One the first Watchdog timeout we get a critical exception. It is left to
board specific code to determine what should happen at this point. If
nothing is done and another timeout period expires the processor may
attempt to reset the machine.
Command line parameters:
wdt=0 : disable watchdog (default)
wdt=1 : enable watchdog
wdt_period=N : N sets the value of the Watchdog Timer Period.
The Watchdog Timer Period meaning is implementation specific. Check
User Manual for the processor for more details.
This patch is based off of work done by Takeharu Kato.
Signed-off-by: Matt McClintock <msm@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/kernel/traps.c')
-rw-r--r-- | arch/ppc/kernel/traps.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 9e6ae5696650..d87423d1003a 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -904,6 +904,25 @@ void SPEFloatingPointException(struct pt_regs *regs) | |||
904 | } | 904 | } |
905 | #endif | 905 | #endif |
906 | 906 | ||
907 | #ifdef CONFIG_BOOKE_WDT | ||
908 | /* | ||
909 | * Default handler for a Watchdog exception, | ||
910 | * spins until a reboot occurs | ||
911 | */ | ||
912 | void __attribute__ ((weak)) WatchdogHandler(struct pt_regs *regs) | ||
913 | { | ||
914 | /* Generic WatchdogHandler, implement your own */ | ||
915 | mtspr(SPRN_TCR, mfspr(SPRN_TCR)&(~TCR_WIE)); | ||
916 | return; | ||
917 | } | ||
918 | |||
919 | void WatchdogException(struct pt_regs *regs) | ||
920 | { | ||
921 | printk (KERN_EMERG "PowerPC Book-E Watchdog Exception\n"); | ||
922 | WatchdogHandler(regs); | ||
923 | } | ||
924 | #endif | ||
925 | |||
907 | void __init trap_init(void) | 926 | void __init trap_init(void) |
908 | { | 927 | { |
909 | } | 928 | } |