summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2014-01-08 08:24:25 +0100
committerStefano Babic <sbabic@denx.de>2014-01-13 11:52:28 +0100
commit5a66016987cd1c77468709070c989cced721b107 (patch)
treef19f385dad89060244bbc1db6011c51b6b347993
parentf353397011a93179f17af9ae1004ab42ce6cfea2 (diff)
downloadu-boot-imx-5a66016987cd1c77468709070c989cced721b107.zip
u-boot-imx-5a66016987cd1c77468709070c989cced721b107.tar.gz
u-boot-imx-5a66016987cd1c77468709070c989cced721b107.tar.bz2
imx6: make use of lldiv(..)
Commit 762a88ccf8540948fbf8c31b40a29d1e0684a25b introduces a 64-bit division without using the lldiv() function, which pulls in previously unused libgcc stuff. Signed-off-by: Måns Rullgård <mans@mansr.com> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Acked-by: Stefano Babic <sbabic@denx.de>
-rw-r--r--arch/arm/cpu/armv7/mx6/clock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index fcc4f35..f12bba2 100644
--- a/arch/arm/cpu/armv7/mx6/clock.c
+++ b/arch/arm/cpu/armv7/mx6/clock.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <div64.h>
#include <asm/io.h>
#include <asm/errno.h>
#include <asm/arch/imx-regs.h>
@@ -123,7 +124,7 @@ static u32 mxc_get_pll_pfd(enum pll_clocks pll, int pfd_num)
return 0;
}
- return (freq * 18) / ((div & ANATOP_PFD_FRAC_MASK(pfd_num)) >>
+ return lldiv(freq * 18, (div & ANATOP_PFD_FRAC_MASK(pfd_num)) >>
ANATOP_PFD_FRAC_SHIFT(pfd_num));
}