From: Asen Chavdarov Dimov Date: Thu, 9 Jun 2011 11:00:07 +0300 Subject: [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. Message-ID: <1307606409-29818-1-git-send-email-dimov@ronetix.at> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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