diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/cpu.c | 19 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/cpu_init.c | 9 |
3 files changed, 9 insertions, 20 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 77c03330303..af45cfe8498 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -34,6 +34,7 @@ config MPC8xx bool "MPC8xx" select BOARD_EARLY_INIT_F imply CMD_REGINFO + imply HW_WATCHDOG endchoice diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 6a1bd8dce4b..7608970e3b1 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -272,24 +272,11 @@ unsigned long get_tbclk(void) /* ------------------------------------------------------------------------- */ -#if defined(CONFIG_WATCHDOG) -void watchdog_reset(void) +#if defined(CONFIG_HW_WATCHDOG) +void hw_watchdog_reset(void) { - int re_enable = disable_interrupts(); + immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR; - reset_8xx_watchdog((immap_t __iomem *)CONFIG_SYS_IMMR); - if (re_enable) - enable_interrupts(); -} -#endif /* CONFIG_WATCHDOG */ - -#if defined(CONFIG_WATCHDOG) - -void reset_8xx_watchdog(immap_t __iomem *immr) -{ - /* - * All other boards use the MPC8xx Internal Watchdog - */ out_be16(&immr->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ out_be16(&immr->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ } diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index 6127c9f7713..99e8c85e7a3 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -26,11 +26,12 @@ void cpu_init_f(immap_t __iomem *immr) /* SYPCR - contains watchdog control (11-9) */ - out_be32(&immr->im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR); +#ifndef CONFIG_HW_WATCHDOG + /* deactivate watchdog if not enabled in config */ + out_be32(&immr->im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR & ~SYPCR_SWE); +#endif -#if defined(CONFIG_WATCHDOG) - reset_8xx_watchdog(immr); -#endif /* CONFIG_WATCHDOG */ + WATCHDOG_RESET(); /* SIUMCR - contains debug pin configuration (11-6) */ setbits_be32(&immr->im_siu_conf.sc_siumcr, CONFIG_SYS_SIUMCR); |