[U-Boot-Users] watchdog reset in mpc824x timer interrupt.

Gleb Natapov gleb at nbase.co.il
Sun Sep 14 17:14:27 CEST 2003


Hello,

 Attached patch makes timer_interrupt to perform watchdog reset on all
boards that support watchdog and not only for OXC.

CHANGELOG:
perform watchdog reset in mpc824x timer interrupt on all boards that have watchdog.

--
			Gleb.
-------------- next part --------------
Index: cpu/mpc824x/interrupts.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/cpu/mpc824x/interrupts.c,v
retrieving revision 1.3
diff -u -r1.3 interrupts.c
--- cpu/mpc824x/interrupts.c	27 Jun 2003 21:32:33 -0000	1.3
+++ cpu/mpc824x/interrupts.c	14 Sep 2003 15:10:44 -0000
@@ -27,6 +27,7 @@
 #include <asm/processor.h>
 #include <asm/pci_io.h>
 #include <commproc.h>
+#include <watchdog.h>
 #include "drivers/epic.h"
 
 /****************************************************************************/
@@ -149,15 +150,9 @@
 
 	timestamp++;
 
-#if defined(CONFIG_WATCHDOG)
+#if defined(CONFIG_WATCHDOG) || defined (CONFIG_HW_WATCHDOG)
 	if ((timestamp % (CFG_HZ / 2)) == 0) {
-#if defined(CONFIG_OXC)
-		{
-			extern void oxc_wdt_reset (void);
-
-			oxc_wdt_reset ();
-		}
-#endif
+		WATCHDOG_RESET ();
 	}
 #endif							/* CONFIG_WATCHDOG */
 #if defined(CONFIG_SHOW_ACTIVITY) && defined(CONFIG_OXC)


More information about the U-Boot mailing list