summaryrefslogtreecommitdiff
path: root/cpu/microblaze/timer.c
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2007-10-18 10:02:16 -0500
committerKim Phillips <kim.phillips@freescale.com>2007-10-18 10:02:16 -0500
commitf147dd15e840230a3911c649b2a81c749d32db1c (patch)
tree03023c12770b6c33c4e9f75615c4a3319d497c90 /cpu/microblaze/timer.c
parent8ffc774993725a0646aa8d1995d968c95aee9e3c (diff)
parenteff786a9b89144478f478c4193fcad5b498feb72 (diff)
downloadu-boot-imx-f147dd15e840230a3911c649b2a81c749d32db1c.zip
u-boot-imx-f147dd15e840230a3911c649b2a81c749d32db1c.tar.gz
u-boot-imx-f147dd15e840230a3911c649b2a81c749d32db1c.tar.bz2
Merge git://www.denx.de/git/u-boot
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 ab1cb12..b350453 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)
{