From 4769be21cca65f1e7bef27bc024d886842bc6bad Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Fri, 15 Jul 2011 02:19:44 +0000 Subject: Timer: Remove reset_timer() for non-Nios2 arches --- arch/arm/cpu/arm926ejs/nomadik/timer.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'arch/arm/cpu/arm926ejs/nomadik') diff --git a/arch/arm/cpu/arm926ejs/nomadik/timer.c b/arch/arm/cpu/arm926ejs/nomadik/timer.c index 1d98ef3eb3..1cd0e1f12a 100644 --- a/arch/arm/cpu/arm926ejs/nomadik/timer.c +++ b/arch/arm/cpu/arm926ejs/nomadik/timer.c @@ -40,16 +40,12 @@ /* Configure a free-running, auto-wrap counter with no prescaler */ int timer_init(void) { + ulong val; + writel(MTU_CRn_ENA | MTU_CRn_PRESCALE_1 | MTU_CRn_32BITS, CONFIG_SYS_TIMERBASE + MTU_CR(0)); - reset_timer(); - return 0; -} -/* Restart counting from 0 */ -void reset_timer(void) -{ - ulong val; + /* Reset the timer */ writel(0, CONFIG_SYS_TIMERBASE + MTU_LR(0)); /* * The load-register isn't really immediate: it changes on clock @@ -59,6 +55,8 @@ void reset_timer(void) val = READ_TIMER(); while (READ_TIMER() == val) ; + + return 0; } /* Return how many HZ passed since "base" */ -- cgit