summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2018-10-05 11:33:52 +0200
committerTom Rini <trini@konsulko.com>2018-10-10 13:35:09 -0400
commit6180ea7e663893cb7330219367252cba471bf225 (patch)
treea35c6b51dcf5d03740f25a8a5c922f99885010ec /arch/arm/cpu/armv7
parentaa33fe86954e342116648a702d34bb0456bdc4a7 (diff)
downloadu-boot-6180ea7e663893cb7330219367252cba471bf225.tar.gz
arm: remove prototype for get_timer_masked
The interruption support had be removed for ARM architecture and the function get_timer_masked() is no more used except in some the timer.c files. This patch clean each timer.c which implement this function and remove the associated prototype in u-boot-arm.h For timer.c, I don't verify if the weak version of get_timer (in lib/time.c) can be used Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r--arch/arm/cpu/armv7/ls102xa/timer.c7
-rw-r--r--arch/arm/cpu/armv7/stv0991/timer.c4
-rw-r--r--arch/arm/cpu/armv7/sunxi/timer.c12
-rw-r--r--arch/arm/cpu/armv7/vf610/timer.c7
4 files changed, 11 insertions, 19 deletions
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 */