diff options
author | Boschung, Rainer <Rainer.Boschung@keymile.com> | 2014-06-03 09:05:14 +0200 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2014-08-01 14:18:17 -0700 |
commit | 0f8062b25b31988bf62f166aa5b988add8454e42 (patch) | |
tree | 7e8143925466d922e6f3264382bebb1096716c62 /arch/powerpc/cpu/mpc85xx/cpu.c | |
parent | 60b295672d61fe79e6af3d9e4f3e8bd23bf3b4ad (diff) | |
download | u-boot-imx-0f8062b25b31988bf62f166aa5b988add8454e42.zip u-boot-imx-0f8062b25b31988bf62f166aa5b988add8454e42.tar.gz u-boot-imx-0f8062b25b31988bf62f166aa5b988add8454e42.tar.bz2 |
mpc85xx: watchdog initialisation added
Function to inititialize the cpu watchdog added.
Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
[York Sun: Add prototype in watchdog.h]
Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/cpu.c')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 684d400..6274f92 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -310,6 +310,14 @@ __weak unsigned long get_tbclk (void) #if defined(CONFIG_WATCHDOG) +#define WATCHDOG_MASK (TCR_WP(63) | TCR_WRC(3) | TCR_WIE) +void +init_85xx_watchdog(void) +{ + mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WATCHDOG_MASK) | + TCR_WP(CONFIG_WATCHDOG_PRESC) | TCR_WRC(CONFIG_WATCHDOG_RC)); +} + void reset_85xx_watchdog(void) { |