From 5c8404aff16c2a207a11e1af5843e1009bf9fb01 Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Fri, 15 Jul 2011 02:18:12 +0000 Subject: Timer: Remove set_timer completely --- arch/m68k/cpu/mcf547x_8x/slicetimer.c | 4 ---- arch/m68k/lib/board.c | 2 -- arch/m68k/lib/time.c | 16 ++-------------- 3 files changed, 2 insertions(+), 20 deletions(-) (limited to 'arch/m68k') diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c index 8dc010a..49dba6a 100644 --- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c +++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c @@ -105,8 +105,4 @@ ulong get_timer(ulong base) return (timestamp - base); } -void set_timer(ulong t) -{ - timestamp = t; -} #endif /* CONFIG_SLTTMR */ diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index 6a892db..945ab66 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -574,8 +574,6 @@ void board_init_r (gd_t *id, ulong dest_addr) udelay (20); - set_timer (0); - /* Insert function pointers now that we have relocated the code */ /* Initialize from environment */ diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index 7eaea5e..d10bcc7 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -126,10 +126,6 @@ ulong get_timer(ulong base) return (timestamp - base); } -void set_timer(ulong t) -{ - timestamp = t; -} #endif /* CONFIG_MCFTMR */ #if defined(CONFIG_MCFPIT) @@ -173,14 +169,6 @@ void timer_init(void) timerp->pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN; } -void set_timer(ulong t) -{ - volatile pit_t *timerp = (pit_t *) (CONFIG_SYS_PIT_BASE); - - timestamp = 0; - timerp->pmr = lastinc = 0; -} - ulong get_timer(ulong base) { unsigned short now, diff; @@ -196,8 +184,8 @@ ulong get_timer(ulong base) void wait_ticks(unsigned long ticks) { - set_timer(0); - while (get_timer(0) < ticks) ; + u32 start = get_timer(0); + while (get_timer(start) < ticks) ; } #endif /* CONFIG_MCFPIT */ -- cgit v1.1