diff mbox

[U-Boot,AT91,rework,0/2] A dummy() implementation _just_ to build drivers/mtd/cfi_flash.c and drivers/block/mg_disk.c drivers.

Message ID 1307606409-29818-1-git-send-email-dimov@ronetix.at
State Rejected
Delegated to: Reinhard Meyer
Headers show

Commit Message

Asen Dimov June 9, 2011, 8 a.m. UTC
In AT91 the get_timer(base) returns the elapsed time
between the time_start and later after some work.
While the "others" are using reset_timer to make
epoches and get current time after some work in that
epoch.

time_start = get_timer(0)
 Some work here
time_elapsed = get_timer(time_start)

Signed-off-by: Asen Chavdarov Dimov <dimov@ronetix.at>
---
 arch/arm/cpu/arm926ejs/at91/timer.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/cpu/arm926ejs/at91/timer.c b/arch/arm/cpu/arm926ejs/at91/timer.c
index a087687..d8d09b9 100644
--- a/arch/arm/cpu/arm926ejs/at91/timer.c
+++ b/arch/arm/cpu/arm926ejs/at91/timer.c
@@ -134,3 +134,21 @@  ulong get_tbclk(void)
 {
 	return gd->timer_rate_hz;
 }
+
+void reset_timer(void)
+{
+	/*
+	 * A dummy() implementation _just_ to build drivers/mtd/cfi_flash.c
+	 * and drivers/block/mg_disk.c drivers.
+	 *
+	 * In AT91 the get_timer(base) returns the elapsed time
+	 * between the time_start and later after some work.
+	 * While the "others" are using reset_timer to make
+	 * epoches and get current time after some work in that
+	 * epoch.
+	 *
+	 * time_start = get_timer(0)
+	 *  Some work here
+	 * time_elapsed = get_timer(time_start)
+	 */
+}