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/armada100/timer.c | 5 ----- arch/arm/cpu/arm926ejs/davinci/timer.c | 5 ----- arch/arm/cpu/arm926ejs/kirkwood/timer.c | 5 ----- arch/arm/cpu/arm926ejs/mb86r0x/timer.c | 5 ----- arch/arm/cpu/arm926ejs/mx25/timer.c | 5 ----- arch/arm/cpu/arm926ejs/mx27/timer.c | 5 ----- arch/arm/cpu/arm926ejs/nomadik/timer.c | 12 +++++------- arch/arm/cpu/arm926ejs/omap/timer.c | 6 ------ arch/arm/cpu/arm926ejs/orion5x/timer.c | 5 ----- arch/arm/cpu/arm926ejs/pantheon/timer.c | 5 ----- arch/arm/cpu/arm926ejs/spear/timer.c | 6 ------ arch/arm/cpu/arm926ejs/versatile/timer.c | 6 ------ 12 files changed, 5 insertions(+), 65 deletions(-) (limited to 'arch/arm/cpu/arm926ejs') diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c index eb4923463d..86da0ce5b0 100644 --- a/arch/arm/cpu/arm926ejs/armada100/timer.c +++ b/arch/arm/cpu/arm926ejs/armada100/timer.c @@ -100,11 +100,6 @@ ulong get_timer_masked(void) return gd->tbu; } -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer(ulong base) { return ((get_timer_masked() / (CONFIG_SYS_HZ_CLOCK / 1000)) - diff --git a/arch/arm/cpu/arm926ejs/davinci/timer.c b/arch/arm/cpu/arm926ejs/davinci/timer.c index 1c6fa4ae87..8b1734c8e1 100644 --- a/arch/arm/cpu/arm926ejs/davinci/timer.c +++ b/arch/arm/cpu/arm926ejs/davinci/timer.c @@ -78,11 +78,6 @@ int timer_init(void) return(0); } -void reset_timer(void) -{ - gd->timer_reset_value = get_ticks(); -} - /* * Get the current 64 bit timer tick count */ diff --git a/arch/arm/cpu/arm926ejs/kirkwood/timer.c b/arch/arm/cpu/arm926ejs/kirkwood/timer.c index e890edbc85..5beb3f530e 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/timer.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/timer.c @@ -112,11 +112,6 @@ ulong get_timer_masked(void) return timestamp; } -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer(ulong base) { return get_timer_masked() - base; diff --git a/arch/arm/cpu/arm926ejs/mb86r0x/timer.c b/arch/arm/cpu/arm926ejs/mb86r0x/timer.c index 6966b0d190..5f540858c5 100644 --- a/arch/arm/cpu/arm926ejs/mb86r0x/timer.c +++ b/arch/arm/cpu/arm926ejs/mb86r0x/timer.c @@ -121,11 +121,6 @@ void __udelay(unsigned long usec) /*NOP*/; } -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer(ulong base) { return get_timer_masked() - base; diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c index 16159ea46e..0e479ac17f 100644 --- a/arch/arm/cpu/arm926ejs/mx25/timer.c +++ b/arch/arm/cpu/arm926ejs/mx25/timer.c @@ -130,11 +130,6 @@ void reset_timer_masked(void) timestamp = 0; /* start "advancing" time stamp from 0 */ } -void reset_timer(void) -{ - reset_timer_masked(); -} - unsigned long long get_ticks (void) { struct gpt_regs *gpt = (struct gpt_regs *)IMX_GPT1_BASE; diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c index 127e670c83..058dbee29c 100644 --- a/arch/arm/cpu/arm926ejs/mx27/timer.c +++ b/arch/arm/cpu/arm926ejs/mx27/timer.c @@ -133,11 +133,6 @@ void reset_timer_masked(void) timestamp = 0; /* start "advancing" time stamp from 0 */ } -void reset_timer(void) -{ - reset_timer_masked(); -} - unsigned long long get_ticks (void) { struct gpt_regs *regs = (struct gpt_regs *)IMX_TIM1_BASE; 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" */ diff --git a/arch/arm/cpu/arm926ejs/omap/timer.c b/arch/arm/cpu/arm926ejs/omap/timer.c index f2e4debc00..390c9c8abb 100644 --- a/arch/arm/cpu/arm926ejs/omap/timer.c +++ b/arch/arm/cpu/arm926ejs/omap/timer.c @@ -65,12 +65,6 @@ int timer_init (void) /* * timer without interrupts */ - -void reset_timer (void) -{ - reset_timer_masked (); -} - ulong get_timer (ulong base) { return get_timer_masked () - base; diff --git a/arch/arm/cpu/arm926ejs/orion5x/timer.c b/arch/arm/cpu/arm926ejs/orion5x/timer.c index f691c99779..5bc43c8c19 100644 --- a/arch/arm/cpu/arm926ejs/orion5x/timer.c +++ b/arch/arm/cpu/arm926ejs/orion5x/timer.c @@ -119,11 +119,6 @@ ulong get_timer_masked(void) return timestamp; } -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer(ulong base) { return get_timer_masked() - base; diff --git a/arch/arm/cpu/arm926ejs/pantheon/timer.c b/arch/arm/cpu/arm926ejs/pantheon/timer.c index b487416eb7..2727adce3d 100644 --- a/arch/arm/cpu/arm926ejs/pantheon/timer.c +++ b/arch/arm/cpu/arm926ejs/pantheon/timer.c @@ -108,11 +108,6 @@ ulong get_timer_masked(void) return gd->tbu; } -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer(ulong base) { return ((get_timer_masked() / (CONFIG_SYS_HZ_CLOCK / 1000)) - diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c index 7305abdd25..cbef34fab5 100644 --- a/arch/arm/cpu/arm926ejs/spear/timer.c +++ b/arch/arm/cpu/arm926ejs/spear/timer.c @@ -76,12 +76,6 @@ int timer_init(void) /* * timer without interrupts */ - -void reset_timer(void) -{ - reset_timer_masked(); -} - ulong get_timer(ulong base) { return (get_timer_masked() / GPT_RESOLUTION) - base; diff --git a/arch/arm/cpu/arm926ejs/versatile/timer.c b/arch/arm/cpu/arm926ejs/versatile/timer.c index 0e51a63830..f58e151662 100644 --- a/arch/arm/cpu/arm926ejs/versatile/timer.c +++ b/arch/arm/cpu/arm926ejs/versatile/timer.c @@ -94,12 +94,6 @@ int timer_init (void) /* * timer without interrupts */ - -void reset_timer (void) -{ - reset_timer_masked (); -} - ulong get_timer (ulong base) { return get_timer_masked () - base; -- cgit