powerpc: mpc8xx: cleaning up watchdog
[oweals/u-boot.git] / arch / powerpc / cpu / mpc8xx / cpu_init.c
index 6127c9f77139299a83bdf0dd6c6021bff1c2191a..99e8c85e7a37c4fc23fc3ce6a5c4bc0022b2d2e4 100644 (file)
@@ -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);