]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
avr32: Disable the AP7000 internal watchdog on startup
authorDavid Brownell <david-b@pacbell.net>
Thu, 17 Apr 2008 05:57:58 +0000 (22:57 -0700)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Tue, 27 May 2008 13:27:29 +0000 (15:27 +0200)
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 <haavard.skinnemoen@atmel.com>
cpu/at32ap/cpu.c

index 311466b781465ac45347bc5abb22f72a5b260c6c..4542e67973256fd1c979102d1dbfa7d5f6fdabce 100644 (file)
@@ -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