projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Timer: Remove reset_timer() for non-Nios2 arches
[platform/kernel/u-boot.git]
/
arch
/
arm
/
cpu
/
armv7
/
mx5
/
timer.c
diff --git
a/arch/arm/cpu/armv7/mx5/timer.c
b/arch/arm/cpu/armv7/mx5/timer.c
index
3044fcf
..
4525beb
100644
(file)
--- a/
arch/arm/cpu/armv7/mx5/timer.c
+++ b/
arch/arm/cpu/armv7/mx5/timer.c
@@
-44,8
+44,10
@@
static struct mxc_gpt *cur_gpt = (struct mxc_gpt *)GPT1_BASE_ADDR;
#define GPTCR_CLKSOURCE_32 (4<<6) /* Clock source */
#define GPTCR_TEN (1) /* Timer enable */
#define GPTCR_CLKSOURCE_32 (4<<6) /* Clock source */
#define GPTCR_TEN (1) /* Timer enable */
-static ulong timestamp;
-static ulong lastinc;
+DECLARE_GLOBAL_DATA_PTR;
+
+#define timestamp (gd->tbl)
+#define lastinc (gd->lastinc)
int timer_init(void)
{
int timer_init(void)
{
@@
-67,11
+69,6
@@
int timer_init(void)
return 0;
}
return 0;
}
-void reset_timer(void)
-{
- reset_timer_masked();
-}
-
void reset_timer_masked(void)
{
ulong val = __raw_readl(&cur_gpt->counter);
void reset_timer_masked(void)
{
ulong val = __raw_readl(&cur_gpt->counter);
@@
-97,11
+94,6
@@
ulong get_timer(ulong base)
return get_timer_masked() - base;
}
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay(unsigned long usec)
{
/* delay x useconds AND preserve advance timestamp value */
void __udelay(unsigned long usec)
{