diff options
author | Pavel Machek <pavel@denx.de> | 2014-09-09 14:03:28 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-10-06 17:46:48 +0200 |
commit | de6da9255ac4017e6bf6c98f533829a6eb67f3f6 (patch) | |
tree | b704a6d12e3bfaf45dbdcaea346ef3061320e44b /arch/arm/cpu/armv7/socfpga/misc.c | |
parent | be324354eebcd809bf539d2414c7c0a370847f26 (diff) | |
download | u-boot-imx-de6da9255ac4017e6bf6c98f533829a6eb67f3f6.zip u-boot-imx-de6da9255ac4017e6bf6c98f533829a6eb67f3f6.tar.gz u-boot-imx-de6da9255ac4017e6bf6c98f533829a6eb67f3f6.tar.bz2 |
arm: socfpga: Add watchdog disable for socfpga
This adds watchdog disable. It is neccessary for running Linux kernel.
Signed-off-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>
V2: Move RSTMGR_PERMODRST_L4WD0_LSB to reset_manager.h
Reset watchdog only if CONFIG_HW_WATCHDOG is undefined (the default)
Diffstat (limited to 'arch/arm/cpu/armv7/socfpga/misc.c')
-rw-r--r-- | arch/arm/cpu/armv7/socfpga/misc.c | 14 |
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 ecae393..b633615 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; |