diff options
author | Tom Rini <trini@konsulko.com> | 2024-07-01 13:17:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-07-01 15:00:56 -0600 |
commit | 65fbdab27224ee3943a89496b21862db83c34da2 (patch) | |
tree | 775a0a54066c2e9a6bbba201676e3d896b5cb0e2 /arch/arm/mach-davinci/timer.c | |
parent | 3f772959501c99fbe5aa0b22a36efe3478d1ae1c (diff) | |
parent | b4cbd1a257d4027038b4f997d73bdb0a066db045 (diff) |
Merge branch 'next'
Diffstat (limited to 'arch/arm/mach-davinci/timer.c')
-rw-r--r-- | arch/arm/mach-davinci/timer.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/arch/arm/mach-davinci/timer.c b/arch/arm/mach-davinci/timer.c index 83c190b620e..474dc6b1abd 100644 --- a/arch/arm/mach-davinci/timer.c +++ b/arch/arm/mach-davinci/timer.c @@ -20,7 +20,7 @@ * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> */ -#include <common.h> +#include <config.h> #include <init.h> #include <time.h> #include <asm/global_data.h> @@ -98,34 +98,3 @@ ulong get_tbclk(void) { return gd->arch.timer_rate_hz; } - -#ifdef CONFIG_HW_WATCHDOG -static struct davinci_timer * const wdttimer = - (struct davinci_timer *)CONFIG_SYS_WDTTIMERBASE; - -/* - * See prufw2.pdf for using Timer as a WDT - */ -void davinci_hw_watchdog_enable(void) -{ - writel(0x0, &wdttimer->tcr); - writel(0x0, &wdttimer->tgcr); - /* TIMMODE = 2h */ - writel(0x08 | 0x03 | ((TIM_CLK_DIV - 1) << 8), &wdttimer->tgcr); - writel(CONFIG_SYS_WDT_PERIOD_LOW, &wdttimer->prd12); - writel(CONFIG_SYS_WDT_PERIOD_HIGH, &wdttimer->prd34); - writel(2 << 22, &wdttimer->tcr); - writel(0x0, &wdttimer->tim12); - writel(0x0, &wdttimer->tim34); - /* set WDEN bit, WDKEY 0xa5c6 */ - writel(0xa5c64000, &wdttimer->wdtcr); - /* clear counter register */ - writel(0xda7e4000, &wdttimer->wdtcr); -} - -void davinci_hw_watchdog_reset(void) -{ - writel(0xa5c64000, &wdttimer->wdtcr); - writel(0xda7e4000, &wdttimer->wdtcr); -} -#endif |