Provide support for microsecond level timer support.

Signed-off-by: Lee Jones <lee.jo...@linaro.org>
---
 arch/arm/cpu/armv7/u8500/timer.c |    5 +++++
 include/common.h                 |    1 +
 2 files changed, 6 insertions(+)

diff --git a/arch/arm/cpu/armv7/u8500/timer.c b/arch/arm/cpu/armv7/u8500/timer.c
index 40326d8..d9a6a2d 100644
--- a/arch/arm/cpu/armv7/u8500/timer.c
+++ b/arch/arm/cpu/armv7/u8500/timer.c
@@ -129,6 +129,11 @@ ulong get_timer(ulong base)
        return get_timer_masked() - base;
 }
 
+u64 get_timer_us(void)
+{
+       return COUNT_TO_USEC(READ_TIMER());
+}
+
 /*
  * Emulation of Power architecture long long timebase.
  *
diff --git a/include/common.h b/include/common.h
index 5e3c5ee..5d24add 100644
--- a/include/common.h
+++ b/include/common.h
@@ -690,6 +690,7 @@ void        irq_install_handler(int, interrupt_handler_t *, 
void *);
 void   irq_free_handler   (int);
 void   reset_timer        (void);
 ulong  get_timer          (ulong base);
+ulong  get_timer_us       (void);
 void   enable_interrupts  (void);
 int    disable_interrupts (void);
 
-- 
1.7.9.5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to