diff options
author | Tom Rini <trini@ti.com> | 2013-12-05 14:48:37 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-12-13 09:16:20 -0500 |
commit | 49a90e29754bf4dc231e882375378996ca570cbf (patch) | |
tree | 1fba3c4c540202a9f73c8029dfa47867f55213cb /arch/arm/cpu/pxa | |
parent | e83bab8403bf5c1cb81b5c0a749c50b917bc9fc3 (diff) | |
download | u-boot-imx-49a90e29754bf4dc231e882375378996ca570cbf.zip u-boot-imx-49a90e29754bf4dc231e882375378996ca570cbf.tar.gz u-boot-imx-49a90e29754bf4dc231e882375378996ca570cbf.tar.bz2 |
ARM:PXA: Correct tick_to_time / us_to_tick to use lldiv
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'arch/arm/cpu/pxa')
-rw-r--r-- | arch/arm/cpu/pxa/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/pxa/timer.c b/arch/arm/cpu/pxa/timer.c index 78d9f32..c4717de 100644 --- a/arch/arm/cpu/pxa/timer.c +++ b/arch/arm/cpu/pxa/timer.c @@ -28,12 +28,12 @@ DECLARE_GLOBAL_DATA_PTR; static unsigned long long tick_to_time(unsigned long long tick) { - return tick * CONFIG_SYS_HZ / TIMER_FREQ_HZ; + return lldiv(tick * CONFIG_SYS_HZ, TIMER_FREQ_HZ); } static unsigned long long us_to_tick(unsigned long long us) { - return (us * TIMER_FREQ_HZ) / 1000000; + return lldiv(us * TIMER_FREQ_HZ, 1000000); } int timer_init(void) |