summaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-07-15 02:18:12 +0000
committerWolfgang Denk <wd@denx.de>2011-07-26 14:52:17 +0200
commit5c8404aff16c2a207a11e1af5843e1009bf9fb01 (patch)
tree65d07a585508bf1dab4ddabf2768e44fb43d6f1f /arch/sh
parentdcac25a05e2bdf35be1e13c432d238007d1c3b9f (diff)
Timer: Remove set_timer completely
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/lib/time.c7
-rw-r--r--arch/sh/lib/time_sh2.c9
2 files changed, 3 insertions, 13 deletions
diff --git a/arch/sh/lib/time.c b/arch/sh/lib/time.c
index bc1656f73ce..c4bfc8638c6 100644
--- a/arch/sh/lib/time.c
+++ b/arch/sh/lib/time.c
@@ -139,15 +139,10 @@ unsigned long get_timer (unsigned long base)
return tick_to_time(get_ticks()) - base;
}
-void set_timer (unsigned long t)
-{
- writel((0 - t), TCNT0);
-}
-
void reset_timer (void)
{
tmu_timer_stop(0);
- set_timer (0);
+ writel(0, TCNT0);
tmu_timer_start(0);
}
diff --git a/arch/sh/lib/time_sh2.c b/arch/sh/lib/time_sh2.c
index 789b46f0e02..a5c838bff0d 100644
--- a/arch/sh/lib/time_sh2.c
+++ b/arch/sh/lib/time_sh2.c
@@ -54,7 +54,7 @@ int timer_init(void)
/* User Device 0 only */
cmt_timer_stop(0);
- set_timer(CMT_TIMER_RESET);
+ writew(CMT_TIMER_RESET, CMCOR_0);
cmt_timer_start(0);
return 0;
@@ -90,15 +90,10 @@ ulong get_timer(ulong base)
return (get_usec() / 1000) - base;
}
-void set_timer(ulong t)
-{
- writew((u16) t, CMCOR_0);
-}
-
void reset_timer(void)
{
cmt_timer_stop(0);
- set_timer(CMT_TIMER_RESET);
+ writew(CMT_TIMER_RESET, CMCOR_0);
cmt0_timer = 0;
cmt_timer_start(0);
}