[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>
This commit is contained in:
committed by
Linus Torvalds
parent
886b9fa499
commit
a2f40ccd29
@@ -48,10 +48,6 @@
|
||||
extern void abort(void);
|
||||
extern void ppc4xx_find_bridges(void);
|
||||
|
||||
extern void ppc4xx_wdt_heartbeat(void);
|
||||
extern int wdt_enable;
|
||||
extern unsigned long wdt_period;
|
||||
|
||||
/* Global Variables */
|
||||
bd_t __res;
|
||||
|
||||
@@ -257,22 +253,6 @@ ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
|
||||
*(char *) (r7 + KERNELBASE) = 0;
|
||||
strcpy(cmd_line, (char *) (r6 + KERNELBASE));
|
||||
}
|
||||
#if defined(CONFIG_PPC405_WDT)
|
||||
/* Look for wdt= option on command line */
|
||||
if (strstr(cmd_line, "wdt=")) {
|
||||
int valid_wdt = 0;
|
||||
char *p, *q;
|
||||
for (q = cmd_line; (p = strstr(q, "wdt=")) != 0;) {
|
||||
q = p + 4;
|
||||
if (p > cmd_line && p[-1] != ' ')
|
||||
continue;
|
||||
wdt_period = simple_strtoul(q, &q, 0);
|
||||
valid_wdt = 1;
|
||||
++q;
|
||||
}
|
||||
wdt_enable = valid_wdt;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Initialize machine-dependent vectors */
|
||||
|
||||
@@ -287,11 +267,6 @@ ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
|
||||
|
||||
ppc_md.calibrate_decr = ppc4xx_calibrate_decr;
|
||||
|
||||
#ifdef CONFIG_PPC405_WDT
|
||||
ppc_md.heartbeat = ppc4xx_wdt_heartbeat;
|
||||
#endif
|
||||
ppc_md.heartbeat_count = 0;
|
||||
|
||||
ppc_md.find_end_of_memory = ppc4xx_find_end_of_memory;
|
||||
ppc_md.setup_io_mappings = ppc4xx_map_io;
|
||||
|
||||
|
Reference in New Issue
Block a user