summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/arm926ejs/nomadik
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-07-15 02:19:44 +0000
committerWolfgang Denk <wd@denx.de>2011-07-26 14:53:30 +0200
commit4769be21cca65f1e7bef27bc024d886842bc6bad (patch)
tree47053c2ed79e6e43b1b6fd49b585fe53028ff6a5 /arch/arm/cpu/arm926ejs/nomadik
parente110c4fe44edc34addee4839a1d20c0fbb076ad4 (diff)
downloadtalos-obmc-uboot-4769be21cca65f1e7bef27bc024d886842bc6bad.tar.gz
talos-obmc-uboot-4769be21cca65f1e7bef27bc024d886842bc6bad.zip
Timer: Remove reset_timer() for non-Nios2 arches
Diffstat (limited to 'arch/arm/cpu/arm926ejs/nomadik')
-rw-r--r--arch/arm/cpu/arm926ejs/nomadik/timer.c12
1 files changed, 5 insertions, 7 deletions
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" */
OpenPOWER on IntegriCloud