From 5a2f1098d81ad58b309e5e558d0492643166a799 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Sat, 14 Jul 2007 00:18:48 +0200 Subject: [PATCH] Support time without timer --- cpu/microblaze/timer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpu/microblaze/timer.c') 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) { -- cgit v1.1 From b90c045f035c3cc9b5d2edaed6048dfb74e40763 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 24 Sep 2007 00:08:37 +0200 Subject: synchronizition with mainline --- cpu/microblaze/timer.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'cpu/microblaze/timer.c') diff --git a/cpu/microblaze/timer.c b/cpu/microblaze/timer.c index b350453..ab1cb12 100644 --- a/cpu/microblaze/timer.c +++ b/cpu/microblaze/timer.c @@ -33,17 +33,10 @@ 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) { -- cgit v1.1 From 1c1100d2fcf46b9d11dcf78d6e5aea75e2e8b716 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 24 Sep 2007 00:21:19 +0200 Subject: [PATCH] Add support for design without interrupt controller Polling timer --- cpu/microblaze/timer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpu/microblaze/timer.c') 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) { -- cgit v1.1