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>
This commit is contained in:
Rob Herring 2012-02-01 16:57:52 +00:00 committed by Albert ARIBAUD
parent f1e2d1762d
commit ceb2071c6b
1 changed files with 2 additions and 2 deletions
arch/arm/cpu/armv7/highbank

View File

@ -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)