]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc: mpc85xx: remove dead watchdog-related code
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Tue, 28 May 2024 11:13:25 +0000 (13:13 +0200)
committerStefan Roese <sr@denx.de>
Sun, 16 Jun 2024 10:14:18 +0000 (12:14 +0200)
Nothing in-tree calls watchdog_reset() anymore (that stopped two years
ago with the removal of the WATCHDOG_RESET macro). So that function is
dead code.

That was the only caller of reset_85xx_watchdog(), so that
can obviously also be removed.

Finally, init_85xx_watchdog() is/was also not called from anywhere, so
that can go away as well, which nicely also removes a bit of
arch-specific code from the generic watchdog.h header.

Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/powerpc/cpu/mpc85xx/cpu.c
include/watchdog.h

index 6356b02163805ed916784fad12c39145e8ef0eb3..ebce2fe3935d3ab1ab5e8ce9c2b8992a9078379b 100644 (file)
@@ -349,37 +349,6 @@ __weak unsigned long get_tbclk(void)
 }
 
 
-#ifndef CONFIG_WDT
-#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(CFG_WATCHDOG_PRESC) | TCR_WRC(CFG_WATCHDOG_RC));
-}
-
-void
-reset_85xx_watchdog(void)
-{
-       /*
-        * Clear TSR(WIS) bit by writing 1
-        */
-       mtspr(SPRN_TSR, TSR_WIS);
-}
-
-void
-watchdog_reset(void)
-{
-       int re_enable = disable_interrupts();
-
-       reset_85xx_watchdog();
-       if (re_enable)
-               enable_interrupts();
-}
-#endif /* CONFIG_WATCHDOG */
-#endif
-
 /*
  * Initializes on-chip MMC controllers.
  * to override, implement board_mmc_init()
index ac5f11e376fa090fe45e4185a43864d04aa6db0f..d1956fafca1b4a4868e7437025f6eaefa358d345 100644 (file)
@@ -40,7 +40,4 @@ int init_func_watchdog_reset(void);
        void hw_watchdog_init(void);
 #endif
 
-#if defined(CONFIG_MPC85xx)
-       void init_85xx_watchdog(void);
-#endif
 #endif /* _WATCHDOG_H_ */