summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-12-30 16:42:23 -0500
committerTom Rini <trini@ti.com>2014-12-30 16:42:23 -0500
commit6d76e2aca82a0da47df80304211203f80b09f082 (patch)
treea70a7a02f5e702b9bd633292d685a22a62fdb4b9 /arch/arm
parent5523cc2b8aa01c81c1df476e4e466d418510eae3 (diff)
parentd0e932de7c8e46ade1994e03e864636db3922520 (diff)
downloadu-boot-imx-6d76e2aca82a0da47df80304211203f80b09f082.zip
u-boot-imx-6d76e2aca82a0da47df80304211203f80b09f082.tar.gz
u-boot-imx-6d76e2aca82a0da47df80304211203f80b09f082.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/armv7/socfpga/misc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/socfpga/misc.c b/arch/arm/cpu/armv7/socfpga/misc.c
index 73cffd3..7873c38 100644
--- a/arch/arm/cpu/armv7/socfpga/misc.c
+++ b/arch/arm/cpu/armv7/socfpga/misc.c
@@ -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;
}