diff options
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/arm920t/ep93xx/timer.c | 7 | ||||
-rw-r--r-- | arch/arm/cpu/arm920t/imx/timer.c | 8 | ||||
-rw-r--r-- | arch/arm/cpu/arm926ejs/armada100/timer.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/arm926ejs/mx27/timer.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/arm926ejs/mxs/timer.c | 7 | ||||
-rw-r--r-- | arch/arm/cpu/arm926ejs/spear/timer.c | 4 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/ls102xa/timer.c | 7 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/stv0991/timer.c | 4 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/sunxi/timer.c | 12 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/vf610/timer.c | 7 | ||||
-rw-r--r-- | arch/arm/cpu/sa1100/timer.c | 8 |
11 files changed, 26 insertions, 42 deletions
diff --git a/arch/arm/cpu/arm920t/ep93xx/timer.c b/arch/arm/cpu/arm920t/ep93xx/timer.c index 5f3609aec3..49bf49bbd3 100644 --- a/arch/arm/cpu/arm920t/ep93xx/timer.c +++ b/arch/arm/cpu/arm920t/ep93xx/timer.c @@ -66,14 +66,9 @@ unsigned long long get_ticks(void) return sys_ticks; } -unsigned long get_timer_masked(void) -{ - return get_ticks(); -} - unsigned long get_timer(unsigned long base) { - return get_timer_masked() - base; + return get_ticks() - base; } void __udelay(unsigned long usec) diff --git a/arch/arm/cpu/arm920t/imx/timer.c b/arch/arm/cpu/arm920t/imx/timer.c index 928990578b..96fff3f683 100644 --- a/arch/arm/cpu/arm920t/imx/timer.c +++ b/arch/arm/cpu/arm920t/imx/timer.c @@ -36,14 +36,14 @@ int timer_init (void) /* * timer without interrupts */ -ulong get_timer (ulong base) +static ulong get_timer_masked (void) { - return get_timer_masked() - base; + return TCN1; } -ulong get_timer_masked (void) +ulong get_timer (ulong base) { - return TCN1; + return get_timer_masked() - base; } void __udelay (unsigned long usec) diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c index f10f678720..d2ecbd07e2 100644 --- a/arch/arm/cpu/arm926ejs/armada100/timer.c +++ b/arch/arm/cpu/arm926ejs/armada100/timer.c @@ -61,7 +61,7 @@ ulong read_timer(void) return(readl(&armd1timers->cvwr)); } -ulong get_timer_masked(void) +static ulong get_timer_masked(void) { ulong now = read_timer(); diff --git a/arch/arm/cpu/arm926ejs/mx27/timer.c b/arch/arm/cpu/arm926ejs/mx27/timer.c index 9399320f6d..94b5d454e9 100644 --- a/arch/arm/cpu/arm926ejs/mx27/timer.c +++ b/arch/arm/cpu/arm926ejs/mx27/timer.c @@ -126,7 +126,7 @@ unsigned long long get_ticks(void) return timestamp; } -ulong get_timer_masked(void) +static ulong get_timer_masked(void) { /* * get_ticks() returns a long long (64 bit), it wraps in diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c index 517cadb20f..7492ba46dc 100644 --- a/arch/arm/cpu/arm926ejs/mxs/timer.c +++ b/arch/arm/cpu/arm926ejs/mxs/timer.c @@ -110,14 +110,9 @@ unsigned long long get_ticks(void) return timestamp; } -ulong get_timer_masked(void) -{ - return tick_to_time(get_ticks()); -} - ulong get_timer(ulong base) { - return get_timer_masked() - base; + return tick_to_time(get_ticks()) - base; } /* We use the HW_DIGCTL_MICROSECONDS register for sub-millisecond timer. */ diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c index a6637c0efe..e7b5bda1bc 100644 --- a/arch/arm/cpu/arm926ejs/spear/timer.c +++ b/arch/arm/cpu/arm926ejs/spear/timer.c @@ -21,6 +21,8 @@ static struct misc_regs *const misc_regs_p = DECLARE_GLOBAL_DATA_PTR; +static ulong get_timer_masked(void); + #define timestamp gd->arch.tbl #define lastdec gd->arch.lastinc @@ -82,7 +84,7 @@ void __udelay(unsigned long usec) ; } -ulong get_timer_masked(void) +static ulong get_timer_masked(void) { ulong now = READ_TIMER(); diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c index 35a557b95c..e79360ada8 100644 --- a/arch/arm/cpu/armv7/ls102xa/timer.c +++ b/arch/arm/cpu/armv7/ls102xa/timer.c @@ -90,14 +90,9 @@ unsigned long long get_ticks(void) return now; } -unsigned long get_timer_masked(void) -{ - return tick_to_time(get_ticks()); -} - unsigned long get_timer(ulong base) { - return get_timer_masked() - base; + return tick_to_time(get_ticks()) - base; } /* delay x useconds and preserve advance timstamp value */ diff --git a/arch/arm/cpu/armv7/stv0991/timer.c b/arch/arm/cpu/armv7/stv0991/timer.c index 2b1fd1b34a..d1b763df8e 100644 --- a/arch/arm/cpu/armv7/stv0991/timer.c +++ b/arch/arm/cpu/armv7/stv0991/timer.c @@ -21,6 +21,8 @@ DECLARE_GLOBAL_DATA_PTR; #define timestamp gd->arch.tbl #define lastdec gd->arch.lastinc +static ulong get_timer_masked(void); + int timer_init(void) { /* Timer1 clock configuration */ @@ -73,7 +75,7 @@ void __udelay(unsigned long usec) ; } -ulong get_timer_masked(void) +static ulong get_timer_masked(void) { ulong now = READ_TIMER(); diff --git a/arch/arm/cpu/armv7/sunxi/timer.c b/arch/arm/cpu/armv7/sunxi/timer.c index 0f8ab0e235..304c1ac5f9 100644 --- a/arch/arm/cpu/armv7/sunxi/timer.c +++ b/arch/arm/cpu/armv7/sunxi/timer.c @@ -55,12 +55,7 @@ int timer_init(void) } /* timer without interrupts */ -ulong get_timer(ulong base) -{ - return get_timer_masked() - base; -} - -ulong get_timer_masked(void) +static ulong get_timer_masked(void) { /* current tick value */ ulong now = TICKS_TO_HZ(read_timer()); @@ -77,6 +72,11 @@ ulong get_timer_masked(void) return gd->arch.tbl; } +ulong get_timer(ulong base) +{ + return get_timer_masked() - base; +} + /* delay x useconds */ void __udelay(unsigned long usec) { diff --git a/arch/arm/cpu/armv7/vf610/timer.c b/arch/arm/cpu/armv7/vf610/timer.c index 6e1308eae0..821a279b63 100644 --- a/arch/arm/cpu/armv7/vf610/timer.c +++ b/arch/arm/cpu/armv7/vf610/timer.c @@ -57,14 +57,9 @@ unsigned long long get_ticks(void) return (((unsigned long long)gd->arch.tbu) << 32) | gd->arch.tbl; } -ulong get_timer_masked(void) -{ - return tick_to_time(get_ticks()); -} - ulong get_timer(ulong base) { - return get_timer_masked() - base; + return tick_to_time(get_ticks()) - base; } /* delay x useconds AND preserve advance timstamp value */ diff --git a/arch/arm/cpu/sa1100/timer.c b/arch/arm/cpu/sa1100/timer.c index c7829c9b09..0fac5c1707 100644 --- a/arch/arm/cpu/sa1100/timer.c +++ b/arch/arm/cpu/sa1100/timer.c @@ -12,14 +12,14 @@ #include <common.h> #include <SA-1100.h> -ulong get_timer (ulong base) +static ulong get_timer_masked (void) { - return get_timer_masked (); + return OSCR; } -ulong get_timer_masked (void) +ulong get_timer (ulong base) { - return OSCR; + return get_timer_masked (); } void __udelay (unsigned long usec) |