diff options
author | Michal Simek <monstr@monstr.eu> | 2007-09-24 00:21:19 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2007-09-24 00:21:19 +0200 |
commit | 1c1100d2fcf46b9d11dcf78d6e5aea75e2e8b716 (patch) | |
tree | 773dcc416d5026f97ca891b8598754e839086261 /cpu/microblaze | |
parent | 0731933ec8ec45d02ba89b52df673d526873cdde (diff) | |
download | u-boot-imx-1c1100d2fcf46b9d11dcf78d6e5aea75e2e8b716.zip u-boot-imx-1c1100d2fcf46b9d11dcf78d6e5aea75e2e8b716.tar.gz u-boot-imx-1c1100d2fcf46b9d11dcf78d6e5aea75e2e8b716.tar.bz2 |
[PATCH] Add support for design without interrupt controller
Polling 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) { |