Typecast the argument with unsigned long long for proper calculation of lldiv
Signed-off-by: Siva Durga Prasad Paladugu <siva...@xilinx.com> --- -Fixes the issue of rounding of the multiplication result to 32-bit value --- arch/arm/cpu/armv7/zynq/timer.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/zynq/timer.c b/arch/arm/cpu/armv7/zynq/timer.c index 2be253c..09a5547 100644 --- a/arch/arm/cpu/armv7/zynq/timer.c +++ b/arch/arm/cpu/armv7/zynq/timer.c @@ -107,7 +107,8 @@ void __udelay(unsigned long usec) if (usec == 0) return; - countticks = lldiv(TIMER_TICK_HZ * usec, 1000000); + countticks = lldiv(((unsigned long long)TIMER_TICK_HZ * usec), + 1000000); /* decrementing timer */ timeend = readl(&timer_base->counter) - countticks; -- 1.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot