]> code.ossystems Code Review - bsp/u-boot.git/commitdiff
imx_watchdog: do not soft-reset while watchdog init
authorAnatolij Gustschin <agust@denx.de>
Tue, 16 Apr 2013 09:01:54 +0000 (11:01 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Thu, 17 Oct 2013 20:47:29 +0000 (17:47 -0300)
Currently the driver clears WCR_SRS bit when enabling
the watchdog and this causes a software reset. Do not
clear WCR_SRS.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
drivers/watchdog/imx_watchdog.c

index 50e602af127b33eef7ab7320a9a552630b8fdc7b..d5993b4d26d6ba6018031cc5b31f7966d13a5ca8 100644 (file)
@@ -19,6 +19,7 @@ struct watchdog_regs {
 #define WCR_WDBG       0x02
 #define WCR_WDE                0x04    /* WDOG enable */
 #define WCR_WDT                0x08
+#define WCR_SRS                0x10
 #define WCR_WDW                0x80
 #define SET_WCR_WT(x)  (x << 8)
 
@@ -45,7 +46,7 @@ void hw_watchdog_init(void)
 #define CONFIG_WATCHDOG_TIMEOUT_MSECS 128000
 #endif
        timeout = (CONFIG_WATCHDOG_TIMEOUT_MSECS / 500) - 1;
-       writew(WCR_WDZST | WCR_WDBG | WCR_WDE | WCR_WDT |
+       writew(WCR_WDZST | WCR_WDBG | WCR_WDE | WCR_WDT | WCR_SRS |
                WCR_WDW | SET_WCR_WT(timeout), &wdog->wcr);
        hw_watchdog_reset();
 }