diff options
author | Michal Simek <monstr@monstr.eu> | 2007-07-14 00:18:48 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2007-07-14 00:18:48 +0200 |
commit | 5a2f1098d81ad58b309e5e558d0492643166a799 (patch) | |
tree | 681bd9075465e789b6733a8727c1ee1bb5dbdd9d /cpu/microblaze | |
parent | a476ca2ac2217ddd05a2bf0c514075814b10a3c0 (diff) | |
download | u-boot-imx-5a2f1098d81ad58b309e5e558d0492643166a799.zip u-boot-imx-5a2f1098d81ad58b309e5e558d0492643166a799.tar.gz u-boot-imx-5a2f1098d81ad58b309e5e558d0492643166a799.tar.bz2 |
[PATCH] Support time without timer
Diffstat (limited to 'cpu/microblaze')
-rw-r--r-- | cpu/microblaze/timer.c | 7 |
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) { |