diff options
author | Angelo Dureghello <angelo@kernel-space.org> | 2023-06-24 23:22:23 +0200 |
---|---|---|
committer | Angelo Dureghello <angelo@kernel-space.org> | 2023-07-25 23:21:42 +0200 |
commit | dc3a89b8c653cde9e925184dd2a79025ac1a181a (patch) | |
tree | cb5532c6ec767f46f9b8e74f0c7d6a1e5811689e /arch/m68k/cpu/mcf532x | |
parent | 9b8bc514a0a6c26459227ffa85e2a093bba56780 (diff) | |
download | u-boot-dc3a89b8c653cde9e925184dd2a79025ac1a181a.tar.gz |
m68k: move watchdog functions in mcf_wdt driver
Move watchdog functions inside a separate watchdog driver.
Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
---
Changes for v2:
- none
Changes for v3:
- none
Diffstat (limited to 'arch/m68k/cpu/mcf532x')
-rw-r--r-- | arch/m68k/cpu/mcf532x/cpu.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/arch/m68k/cpu/mcf532x/cpu.c b/arch/m68k/cpu/mcf532x/cpu.c index 548cbca36aa..18d20a89265 100644 --- a/arch/m68k/cpu/mcf532x/cpu.c +++ b/arch/m68k/cpu/mcf532x/cpu.c @@ -12,7 +12,6 @@ #include <init.h> #include <net.h> #include <vsprintf.h> -#include <watchdog.h> #include <command.h> #include <netdev.h> #include <asm/global_data.h> @@ -102,49 +101,6 @@ int print_cpuinfo(void) }; #endif /* CONFIG_DISPLAY_CPUINFO */ -#if defined(CONFIG_WATCHDOG) -/* Called by macro WATCHDOG_RESET */ -void watchdog_reset(void) -{ - wdog_t *wdp = (wdog_t *) (MMAP_WDOG); - - /* Count register */ - out_be16(&wdp->sr, 0x5555); - out_be16(&wdp->sr, 0xaaaa); -} - -int watchdog_disable(void) -{ - wdog_t *wdp = (wdog_t *) (MMAP_WDOG); - - /* UserManual, once the wdog is disabled, wdog cannot be re-enabled */ - /* halted watchdog timer */ - setbits_be16(&wdp->cr, WTM_WCR_HALTED); - - puts("WATCHDOG:disabled\n"); - return (0); -} - -int watchdog_init(void) -{ - wdog_t *wdp = (wdog_t *) (MMAP_WDOG); - u32 wdog_module = 0; - - /* set timeout and enable watchdog */ - wdog_module = ((CFG_SYS_CLK / 1000) * CONFIG_WATCHDOG_TIMEOUT_MSECS); -#ifdef CONFIG_M5329 - out_be16(&wdp->mr, wdog_module / 8192); -#else - out_be16(&wdp->mr, wdog_module / 4096); -#endif - - out_be16(&wdp->cr, WTM_WCR_EN); - puts("WATCHDOG:enabled\n"); - - return (0); -} -#endif /* CONFIG_WATCHDOG */ - #if defined(CONFIG_MCFFEC) /* Default initializations for MCFFEC controllers. To override, * create a board-specific function called: |