powerpc: mpc8xx: move watchdog into drivers/watchdog
In preparation of DM watchdog, move basic actions into drivers/watchdog
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index af45cfe..13a7956 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -34,7 +34,7 @@
bool "MPC8xx"
select BOARD_EARLY_INIT_F
imply CMD_REGINFO
- imply HW_WATCHDOG
+ imply MPC8xx_WATCHDOG
endchoice
diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
index f112317..b0e90a0 100644
--- a/arch/powerpc/cpu/mpc8xx/Kconfig
+++ b/arch/powerpc/cpu/mpc8xx/Kconfig
@@ -25,6 +25,10 @@
endchoice
+config MPC8xx_WATCHDOG
+ bool "Watchdog"
+ select HW_WATCHDOG
+
config 8xx_GCLK_FREQ
int "CPU GCLK Frequency"
diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c
index 7608970..d17ad84 100644
--- a/arch/powerpc/cpu/mpc8xx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xx/cpu.c
@@ -270,18 +270,6 @@
return oscclk / 16;
}
-/* ------------------------------------------------------------------------- */
-
-#if defined(CONFIG_HW_WATCHDOG)
-void hw_watchdog_reset(void)
-{
- immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR;
-
- out_be16(&immr->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */
- out_be16(&immr->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
-}
-#endif /* CONFIG_WATCHDOG */
-
/*
* Initializes on-chip ethernet controllers.
* to override, implement board_eth_init()