arm: davinci: remove unused watchdog functions
Subsystems (3)
PATCH 1/1 arm: davinci: remove unused watchdog functions
The davinci_hw_watchdog_ functions are defined but never called from anywhere. Commit 881ae794b93b ("calimain: remove board") eliminated the last call to these functions.
--- .../mach-davinci/include/mach/timer_defs.h | 4 --- arch/arm/mach-davinci/timer.c | 31 ------------------- 2 files changed, 35 deletions(-)
arch/arm/mach-davinci/include/mach/timer_defs.h +0 -4
@@ -36,8 +36,4 @@ struct davinci_timer {#define DV_WDT_ENABLE_SYS_RESET 0x00020000#define DV_WDT_TRIGGER_SYS_RESET 0x00020002 -#ifdef CONFIG_HW_WATCHDOG -void davinci_hw_watchdog_enable (void ); -void davinci_hw_watchdog_reset (void ); -#endif #endif /* _TIMER_DEFS_H_ */
arch/arm/mach-davinci/timer.c +0 -31
@@ -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
base-commit: 01a5d7547ed3a51a8ac5837c31a150f85bc475f8
Signature · 1 line
2.45.2
Quoted 9 lines · Emil Kronborg
The
davinci_hw_watchdog_functions are defined but never called from anywhere. Commit881ae794b93b("calimain: remove board") eliminated the last call to these functions.Signed-off-by Emil Kronborg <[email protected]>--- .../mach-davinci/include/mach/timer_defs.h | 4 --- arch/arm/mach-davinci/timer.c | 31 ------------------- 2 files changed, 35 deletions(-)
Nice small cleanup:
Thanks,
Stefan
Quoted 53 lines
arch/arm/mach-davinci/include/mach/timer_defs.h +0
-4@@ -36,8 +36,4 @@ struct davinci_timer {#define DV_WDT_ENABLE_SYS_RESET 0x00020000#define DV_WDT_TRIGGER_SYS_RESET 0x00020002 -#ifdef CONFIG_HW_WATCHDOG -void davinci_hw_watchdog_enable (void ); -void davinci_hw_watchdog_reset (void ); -#endif #endif /* _TIMER_DEFS_H_ */ arch/arm/mach-davinci/timer.c +0
-31@@ -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
Quoted 1 line
base-commit:
01a5d7547ed3a51a8ac5837c31a150f85bc475f8
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 5 lines · Emil Kronborg
The
davinci_hw_watchdog_functions are defined but never called from anywhere. Commit881ae794b93b("calimain: remove board") eliminated the last call to these functions.
Applied to u-boot/next, thanks!
Signature · 1 line
Tom