summaryrefslogtreecommitdiff
path: root/lib/time.c
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2014-01-26 12:11:54 +0100
committerStefano Babic <sbabic@denx.de>2014-01-26 12:11:54 +0100
commit707acd01ded3c60a4e277f7c5432d397897b4dfd (patch)
tree5730e1e1f0bac6c1aeddc261cb412fc3d5f220fd /lib/time.c
parentbe2a3bb39adf1fdd274fc427e30ef62eb86441a1 (diff)
parentc71b4dd2da0dcddabd7c29e6c3dc8a495d4bd928 (diff)
downloadu-boot-imx-707acd01ded3c60a4e277f7c5432d397897b4dfd.zip
u-boot-imx-707acd01ded3c60a4e277f7c5432d397897b4dfd.tar.gz
u-boot-imx-707acd01ded3c60a4e277f7c5432d397897b4dfd.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'lib/time.c')
-rw-r--r--lib/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/time.c b/lib/time.c
index 09bb05a..8085aa4 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -71,8 +71,8 @@ unsigned long __weak notrace timer_get_us(void)
}
static unsigned long long usec_to_tick(unsigned long usec)
{
- uint64_t tick = usec * get_tbclk();
- usec *= get_tbclk();
+ uint64_t tick = usec;
+ tick *= get_tbclk();
do_div(tick, 1000000);
return tick;
}