diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2010-02-06 17:20:09 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2010-02-06 17:20:09 +0900 |
commit | bdaef38171c9ea030bae46b798aba4f430dcac18 (patch) | |
tree | 4da072aceaa42e7ff3ec9962f5d99a9ca667ace9 /cpu/mpc5xxx/cpu.c | |
parent | ed44387f406ca0e695609270a1282e699111a945 (diff) | |
parent | c20a3c0bac909a0a1311eaafdec156b6a8686d46 (diff) | |
download | u-boot-imx-bdaef38171c9ea030bae46b798aba4f430dcac18.zip u-boot-imx-bdaef38171c9ea030bae46b798aba4f430dcac18.tar.gz u-boot-imx-bdaef38171c9ea030bae46b798aba4f430dcac18.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts:
cpu/arm_cortexa8/s5pc1xx/cache.c
include/configs/spear6xx.h
lib_ppc/reloc.S
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'cpu/mpc5xxx/cpu.c')
-rw-r--r-- | cpu/mpc5xxx/cpu.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c index 2a28df4..edfb828 100644 --- a/cpu/mpc5xxx/cpu.c +++ b/cpu/mpc5xxx/cpu.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2003 + * (C) Copyright 2000-2010 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -192,3 +192,21 @@ int cpu_eth_init(bd_t *bis) return mpc5xxx_fec_initialize(bis); } #endif + +#if defined(CONFIG_WATCHDOG) +void watchdog_reset(void) +{ + int re_enable = disable_interrupts(); + reset_5xxx_watchdog(); + if (re_enable) enable_interrupts(); +} + +void reset_5xxx_watchdog(void) +{ + volatile struct mpc5xxx_gpt *gpt0 = + (struct mpc5xxx_gpt *) MPC5XXX_GPT; + + /* Trigger TIMER_0 by writing A5 to OCPW */ + clrsetbits_be32(&gpt0->emsr, 0xff000000, 0xa5000000); +} +#endif /* CONFIG_WATCHDOG */ |