summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/socfpga/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/armv7/socfpga/misc.c')
-rw-r--r--arch/arm/cpu/armv7/socfpga/misc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/socfpga/misc.c b/arch/arm/cpu/armv7/socfpga/misc.c
index ecae393410..b633615208 100644
--- a/arch/arm/cpu/armv7/socfpga/misc.c
+++ b/arch/arm/cpu/armv7/socfpga/misc.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <miiphy.h>
#include <netdev.h>
+#include <asm/arch/reset_manager.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -36,6 +37,19 @@ int overwrite_console(void)
}
#endif
+int arch_cpu_init(void)
+{
+ /*
+ * 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;
+}
+
int misc_init_r(void)
{
return 0;