summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/arm926ejs')
-rw-r--r--arch/arm/cpu/arm926ejs/armada100/timer.c10
-rw-r--r--arch/arm/cpu/arm926ejs/kirkwood/timer.c10
-rw-r--r--arch/arm/cpu/arm926ejs/mb86r0x/timer.c14
-rw-r--r--arch/arm/cpu/arm926ejs/mx25/timer.c9
-rw-r--r--arch/arm/cpu/arm926ejs/mx27/timer.c9
-rw-r--r--arch/arm/cpu/arm926ejs/orion5x/timer.c10
-rw-r--r--arch/arm/cpu/arm926ejs/pantheon/timer.c10
-rw-r--r--arch/arm/cpu/arm926ejs/spear/timer.c11
8 files changed, 14 insertions, 69 deletions
diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c
index 86da0ce..82a6d7b 100644
--- a/arch/arm/cpu/arm926ejs/armada100/timer.c
+++ b/arch/arm/cpu/arm926ejs/armada100/timer.c
@@ -77,13 +77,6 @@ ulong read_timer(void)
return(readl(&armd1timers->cvwr));
}
-void reset_timer_masked(void)
-{
- /* reset time */
- gd->tbl = read_timer();
- gd->tbu = 0;
-}
-
ulong get_timer_masked(void)
{
ulong now = read_timer();
@@ -142,7 +135,8 @@ int timer_init(void)
/* Enable timer 0 */
writel(0x1, &armd1timers->cer);
/* init the gd->tbu and gd->tbl value */
- reset_timer_masked();
+ gd->tbl = read_timer();
+ gd->tbu = 0;
return 0;
}
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/timer.c b/arch/arm/cpu/arm926ejs/kirkwood/timer.c
index 5beb3f5..b4f6cf8 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/timer.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/timer.c
@@ -88,13 +88,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define timestamp gd->tbl
#define lastdec gd->lastinc
-void reset_timer_masked(void)
-{
- /* reset time */
- lastdec = READ_TIMER;
- timestamp = 0;
-}
-
ulong get_timer_masked(void)
{
ulong now = READ_TIMER;
@@ -154,7 +147,8 @@ int timer_init(void)
writel(cntmrctrl, CNTMR_CTRL_REG);
/* init the timestamp and lastdec value */
- reset_timer_masked();
+ lastdec = READ_TIMER;
+ timestamp = 0;
return 0;
}
diff --git a/arch/arm/cpu/arm926ejs/mb86r0x/timer.c b/arch/arm/cpu/arm926ejs/mb86r0x/timer.c
index 5f54085..8f38056 100644
--- a/arch/arm/cpu/arm926ejs/mb86r0x/timer.c
+++ b/arch/arm/cpu/arm926ejs/mb86r0x/timer.c
@@ -68,7 +68,9 @@ int timer_init(void)
writel(ctrl, &timer->control);
- reset_timer_masked();
+ /* capture current value time */
+ lastdec = readl(&timer->value);
+ timestamp = 0; /* start "advancing" time stamp from 0 */
return 0;
}
@@ -94,16 +96,6 @@ unsigned long long get_ticks(void)
return timestamp;
}
-void reset_timer_masked(void)
-{
- struct mb86r0x_timer * timer = (struct mb86r0x_timer *)
- MB86R0x_TIMER_BASE;
-
- /* capture current value time */
- lastdec = readl(&timer->value);
- timestamp = 0; /* start "advancing" time stamp from 0 */
-}
-
ulong get_timer_masked(void)
{
return tick_to_time(get_ticks());
diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c
index 0e479ac..5eb2747 100644
--- a/arch/arm/cpu/arm926ejs/mx25/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx25/timer.c
@@ -121,15 +121,6 @@ int timer_init(void)
return 0;
}
-void reset_timer_masked(void)
-{
- struct gpt_regs *gpt = (struct gpt_regs *)IMX_GPT1_BASE;
- /* reset time */
- /* capture current incrementer value time */
- lastinc = readl(&gpt->counter);
- timestamp = 0; /* start "advancing" time stamp from 0 */
-}
-
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 058dbee..df76d16 100644
--- a/arch/arm/cpu/arm926ejs/mx27/timer.c
+++ b/arch/arm/cpu/arm926ejs/mx27/timer.c
@@ -124,15 +124,6 @@ int timer_init(void)
return 0;
}
-void reset_timer_masked(void)
-{
- struct gpt_regs *regs = (struct gpt_regs *)IMX_TIM1_BASE;
- /* reset time */
- /* capture current incrementer value time */
- lastinc = readl(&regs->gpt_tcn);
- timestamp = 0; /* start "advancing" time stamp from 0 */
-}
-
unsigned long long get_ticks (void)
{
struct gpt_regs *regs = (struct gpt_regs *)IMX_TIM1_BASE;
diff --git a/arch/arm/cpu/arm926ejs/orion5x/timer.c b/arch/arm/cpu/arm926ejs/orion5x/timer.c
index 5bc43c8..17df68f 100644
--- a/arch/arm/cpu/arm926ejs/orion5x/timer.c
+++ b/arch/arm/cpu/arm926ejs/orion5x/timer.c
@@ -95,13 +95,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define timestamp gd->tbl
#define lastdec gd->lastinc
-void reset_timer_masked(void)
-{
- /* reset time */
- lastdec = read_timer();
- timestamp = 0;
-}
-
ulong get_timer_masked(void)
{
ulong now = read_timer();
@@ -171,5 +164,6 @@ int timer_init(void)
void timer_init_r(void)
{
/* init the timestamp and lastdec value */
- reset_timer_masked();
+ lastdec = read_timer();
+ timestamp = 0;
}
diff --git a/arch/arm/cpu/arm926ejs/pantheon/timer.c b/arch/arm/cpu/arm926ejs/pantheon/timer.c
index 2727adc..c71162a 100644
--- a/arch/arm/cpu/arm926ejs/pantheon/timer.c
+++ b/arch/arm/cpu/arm926ejs/pantheon/timer.c
@@ -85,13 +85,6 @@ ulong read_timer(void)
return val;
}
-void reset_timer_masked(void)
-{
- /* reset time */
- gd->tbl = read_timer();
- gd->tbu = 0;
-}
-
ulong get_timer_masked(void)
{
ulong now = read_timer();
@@ -151,7 +144,8 @@ int timer_init(void)
/* Enable timer 0 */
writel(0x1, &panthtimers->cer);
/* init the gd->tbu and gd->tbl value */
- reset_timer_masked();
+ gd->tbl = read_timer();
+ gd->tbu = 0;
return 0;
}
diff --git a/arch/arm/cpu/arm926ejs/spear/timer.c b/arch/arm/cpu/arm926ejs/spear/timer.c
index cbef34f..1dc7860 100644
--- a/arch/arm/cpu/arm926ejs/spear/timer.c
+++ b/arch/arm/cpu/arm926ejs/spear/timer.c
@@ -68,7 +68,9 @@ int timer_init(void)
/* auto reload, start timer */
writel(readl(&gpt_regs_p->control) | GPT_ENABLE, &gpt_regs_p->control);
- reset_timer_masked();
+ /* Reset the timer */
+ lastdec = READ_TIMER();
+ timestamp = 0;
return 0;
}
@@ -97,13 +99,6 @@ void __udelay(unsigned long usec)
;
}
-void reset_timer_masked(void)
-{
- /* reset time */
- lastdec = READ_TIMER();
- timestamp = 0;
-}
-
ulong get_timer_masked(void)
{
ulong now = READ_TIMER();