summaryrefslogtreecommitdiff
path: root/cpu/microblaze/timer.c
diff options
context:
space:
mode:
authorAndy Fleming <[email protected]>2007-10-19 11:24:22 -0500
committerAndrew Fleming-AFLEMING <[email protected]>2007-10-19 11:24:22 -0500
commitd4d1e9bee7c45ea8c513d3af697c864107f1c4d1 (patch)
tree3cd7eba359e6729454f4fac5b96209eb959ecf72 /cpu/microblaze/timer.c
parent1487adbdcf9594bb2eb686325a6f9540dad1b70a (diff)
parent27d2b1ed216b457a66c17d38ce5ffdf3c2c32d1e (diff)
Merge branch 'denx'
Diffstat (limited to 'cpu/microblaze/timer.c')
-rw-r--r--cpu/microblaze/timer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpu/microblaze/timer.c b/cpu/microblaze/timer.c
index ab1cb127492..b350453443e 100644
--- a/cpu/microblaze/timer.c
+++ b/cpu/microblaze/timer.c
@@ -33,10 +33,17 @@ void reset_timer (void)
timestamp = 0;
}
+#ifdef CFG_TIMER_0
ulong get_timer (ulong base)
{
return (timestamp - base);
}
+#else
+ulong get_timer (ulong base)
+{
+ return (timestamp++ - base);
+}
+#endif
void set_timer (ulong t)
{