public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH][AT91 rework 0/2] A dummy() implementation _just_ to build drivers/mtd/cfi_flash.c and drivers/block/mg_disk.c drivers.
@ 2011-06-09  8:00 Asen Chavdarov Dimov
  2011-06-09  8:00 ` [U-Boot] [PATCH][AT91 rework 1/2] change common at91sam9261 files after AT91 rework Asen Chavdarov Dimov
  2011-06-09  8:00 ` [U-Boot] [PATCH][AT91 rework 2/2] make pm9261 buildable for v2011.06 release Asen Chavdarov Dimov
  0 siblings, 2 replies; 12+ messages in thread
From: Asen Chavdarov Dimov @ 2011-06-09  8:00 UTC (permalink / raw)
  To: u-boot

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 --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)
+	 */
+}
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-07-26 14:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-09  8:00 [U-Boot] [PATCH][AT91 rework 0/2] A dummy() implementation _just_ to build drivers/mtd/cfi_flash.c and drivers/block/mg_disk.c drivers Asen Chavdarov Dimov
2011-06-09  8:00 ` [U-Boot] [PATCH][AT91 rework 1/2] change common at91sam9261 files after AT91 rework Asen Chavdarov Dimov
2011-07-18 17:04   ` [U-Boot] [PATCH, AT91, rework v2] " Asen Dimov
2011-07-26  7:14     ` Reinhard Meyer
2011-07-26  9:11       ` RONETIX - Asen Dimov
2011-07-26  9:19         ` RONETIX - Asen Dimov
2011-07-26  9:34           ` Reinhard Meyer
2011-07-26  9:50           ` Reinhard Meyer
2011-07-26  9:58         ` Reinhard Meyer
2011-07-26 11:23           ` RONETIX - Asen Dimov
2011-06-09  8:00 ` [U-Boot] [PATCH][AT91 rework 2/2] make pm9261 buildable for v2011.06 release Asen Chavdarov Dimov
2011-07-26 14:48   ` [U-Boot] [PATCH, AT91 rework] pm9261: compiles with the AT91 reworked scheme Asen Chavdarov Dimov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox