aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-02-01 13:23:56 -0600
committerJohn Rigby <john.rigby@linaro.org>2012-02-07 17:03:52 -0800
commit57614909cbb94e813debe92d014e0096e48d4b1a (patch)
treeb0d492aa54fcd7ad08a7f2ab5ea0fd415d63588e
parent44deec8002e0123d0bbc4c55b209451dab549caf (diff)
downloadu-boot-linaro-stable-57614909cbb94e813debe92d014e0096e48d4b1a.tar.gz
ARM: highbank: fix us_to_tick calculation
udelay calls were off due to failing to convert us to ns. Fix this and drop the unnecessary shifts since NS_PER_TICK is only 7ns. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
-rw-r--r--arch/arm/cpu/armv7/highbank/timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/highbank/timer.c b/arch/arm/cpu/armv7/highbank/timer.c
index d8a02888a..d5b6cb67c 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)