Skip to contentSkip to conversation

arm: socfpga: Change watchdog timeout

PATCH Superseded Stefan Roese 1 participant 1 message Dec 19, 2014 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: Change watchdog timeout

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.

Cc Vince Bridgers <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Chin Liang See <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Pavel Machek <[email protected]>
---
 arch/arm/cpu/armv7/socfpga/misc.c | 9 +++++++++
 include/configs/socfpga_common.h  | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/socfpga/misc.c +9 -0
index 73cffd3..ed26645 100644
@@ -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>
@@ -157,6 +158,14 @@ int arch_cpu_init(void)
 	 */
 #ifndef CONFIG_HW_WATCHDOG
 	socfpga_watchdog_reset();
+#else
+	/*
+	 * In case the watchdog is enabled, make sure to (re-)configure it
+	 * so that the defined timeout is valid. Otherwise the SPL (Preloader)
+	 * timeout value is still active which might be too short for Linux
+	 * booting.
+	 */
+	hw_watchdog_init();
 #endif
 	return 0;
 }
include/configs/socfpga_common.h +1 -1
index 6bb9473..6b1f967 100644
@@ -139,7 +139,7 @@
 #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
 
 /*
Signature · 1 line
2.2.1