diff options
author | Heiko Schocher <hs@denx.de> | 2013-08-19 16:38:59 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-08-28 11:44:59 -0400 |
commit | 988ea355018a7060768b8e6ddcee1ffa7cf6351b (patch) | |
tree | d0365fe702b63da442ff038c8f54029cd0ca1bf0 /arch/arm/include | |
parent | a09f96498bb2a31bb78388b5f094dc0e9295f86e (diff) | |
download | u-boot-imx-988ea355018a7060768b8e6ddcee1ffa7cf6351b.zip u-boot-imx-988ea355018a7060768b8e6ddcee1ffa7cf6351b.tar.gz u-boot-imx-988ea355018a7060768b8e6ddcee1ffa7cf6351b.tar.bz2 |
arm, am335x: add watchdog support
Add TI OMAP 16xx & 24xx/34xx 32KHz (non-secure) watchdog support.
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@ti.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/arch-am33xx/cpu.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h index 1835c89..73e6db8 100644 --- a/arch/arm/include/asm/arch-am33xx/cpu.h +++ b/arch/arm/include/asm/arch-am33xx/cpu.h @@ -46,6 +46,26 @@ #define PRM_RSTCTRL_RESET 0x01 #define PRM_RSTST_WARM_RESET_MASK 0x232 +/* + * Watchdog: + * Using the prescaler, the OMAP watchdog could go for many + * months before firing. These limits work without scaling, + * with the 60 second default assumed by most tools and docs. + */ +#define TIMER_MARGIN_MAX (24 * 60 * 60) /* 1 day */ +#define TIMER_MARGIN_DEFAULT 60 /* 60 secs */ +#define TIMER_MARGIN_MIN 1 + +#define PTV 0 /* prescale */ +#define GET_WLDR_VAL(secs) (0xffffffff - ((secs) * (32768/(1<<PTV))) + 1) +#define WDT_WWPS_PEND_WCLR BIT(0) +#define WDT_WWPS_PEND_WLDR BIT(2) +#define WDT_WWPS_PEND_WTGR BIT(3) +#define WDT_WWPS_PEND_WSPR BIT(4) + +#define WDT_WCLR_PRE BIT(5) +#define WDT_WCLR_PTV_OFF 2 + #ifndef __KERNEL_STRICT_NAMES #ifndef __ASSEMBLY__ struct gpmc_cs { |