| Submitter | Lee Jones |
|---|---|
| Date | Nov. 20, 2012, 2:33 p.m. |
| Message ID | <1353422034-28107-3-git-send-email-lee.jones@linaro.org> |
| Download | mbox | patch |
| Permalink | /patch/200355/ |
| State | Rejected |
| Delegated to: | Wolfgang Denk |
| Headers | show |
Comments
Patch
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);
Provide support for microsecond level timer support. Signed-off-by: Lee Jones <lee.jones@linaro.org> --- arch/arm/cpu/armv7/u8500/timer.c | 5 +++++ include/common.h | 1 + 2 files changed, 6 insertions(+)