From: David Brownell <[EMAIL PROTECTED]>

This patch forces the watchdog off in all cases.  That will at least
get rid of the constant reboot cycle, though it won't let the watchdog
actually run in the new kernels:  its probe() comes up with a polite
warning.

Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]>
---
 cpu/at32ap/cpu.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cpu/at32ap/cpu.c b/cpu/at32ap/cpu.c
index 311466b..4542e67 100644
--- a/cpu/at32ap/cpu.c
+++ b/cpu/at32ap/cpu.c
@@ -86,6 +86,10 @@ int cpu_init(void)
        extern void _evba(void);
        char *p;
 
+       /* in case of soft resets, disable watchdog */
+       sm_writel(WDT_CTRL, SM_BF(KEY, 0x55));
+       sm_writel(WDT_CTRL, SM_BF(KEY, 0xaa));
+
        gd->cpu_hz = CFG_OSC0_HZ;
 
        /* TODO: Move somewhere else, but needs to be run before we
-- 
1.5.5.1


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to