diff options
Diffstat (limited to 'arch/arm/cpu/armv7/highbank/timer.c')
-rw-r--r-- | arch/arm/cpu/armv7/highbank/timer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/highbank/timer.c b/arch/arm/cpu/armv7/highbank/timer.c index d8a0288..0f985e2 100644 --- a/arch/arm/cpu/armv7/highbank/timer.c +++ b/arch/arm/cpu/armv7/highbank/timer.c @@ -66,10 +66,10 @@ static inline unsigned long long time_to_tick(unsigned long long time) static inline unsigned long long us_to_tick(unsigned long long us) { - unsigned long long tick = us << 16; + unsigned long long tick = us * 1000; tick += NS_PER_TICK - 1; do_div(tick, NS_PER_TICK); - return tick >> 16; + return tick; } unsigned long long get_ticks(void) @@ -121,3 +121,8 @@ ulong get_timer_masked(void) { return tick_to_time(get_ticks()); } + +ulong get_tbclk(void) +{ + return CONFIG_SYS_HZ; +} |