]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: socfpga: Change watchdog timeout
authorStefan Roese <sr@denx.de>
Fri, 19 Dec 2014 12:49:10 +0000 (13:49 +0100)
committerMarek Vasut <marex@denx.de>
Sun, 21 Dec 2014 13:39:04 +0000 (14:39 +0100)
The current current watchdog timeout of 12 seconds is a bit small for
booting into Linux, especially when using a NFS based rootfs. So lets
change this timeout to a more defensive value of 30 seconds.

Also we now call the hw_watchdog_init() function so that we override
the value already configured from the Preloader.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Vince Bridgers <vbridger@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Pavel Machek <pavel@denx.de>
arch/arm/cpu/armv7/socfpga/misc.c
include/configs/socfpga_common.h

index 73cffd3a8d6f13a3f1fe8c10de1675912de5ca62..7873c38e2b1445bb414471cd084b5b2eea60bd4f 100644 (file)
@@ -9,6 +9,7 @@
 #include <altera.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <watchdog.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/system_manager.h>
 #include <asm/arch/dwmmc.h>
@@ -150,14 +151,23 @@ static inline void socfpga_fpga_add(void) {}
 
 int arch_cpu_init(void)
 {
+#ifdef CONFIG_HW_WATCHDOG
+       /*
+        * In case the watchdog is enabled, make sure to (re-)configure it
+        * so that the defined timeout is valid. Otherwise the SPL (Perloader)
+        * timeout value is still active which might too short for Linux
+        * booting.
+        */
+       hw_watchdog_init();
+#else
        /*
         * If the HW watchdog is NOT enabled, make sure it is not running,
         * for example because it was enabled in the preloader. This might
         * trigger a watchdog-triggered reboot of Linux kernel later.
         */
-#ifndef CONFIG_HW_WATCHDOG
        socfpga_watchdog_reset();
 #endif
+
        return 0;
 }
 
index 6bb9473c82bfc444fc07cf07e1839045f4790812..6b1f967c44eb2068ecac0cc2270c46485e705654 100644 (file)
 #define CONFIG_DESIGNWARE_WATCHDOG
 #define CONFIG_DW_WDT_BASE             SOCFPGA_L4WD0_ADDRESS
 #define CONFIG_DW_WDT_CLOCK_KHZ                25000
-#define CONFIG_HW_WATCHDOG_TIMEOUT_MS  12000
+#define CONFIG_HW_WATCHDOG_TIMEOUT_MS  30000
 #endif
 
 /*