From e158665c1e4c4665302f0d95e26b7c7e6b70a83c Mon Sep 17 00:00:00 2001 From: Siva Durga Prasad Paladugu Date: Wed, 12 Feb 2014 21:38:35 +0530 Subject: [PATCH] arm: zynq: correct the argument to lldiv Typecast the argument with unsigned long long for proper calculation of lldiv Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- arch/arm/cpu/armv7/zynq/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/zynq/timer.c b/arch/arm/cpu/armv7/zynq/timer.c index 174e5a18f6..303dbcfcea 100644 --- a/arch/arm/cpu/armv7/zynq/timer.c +++ b/arch/arm/cpu/armv7/zynq/timer.c @@ -110,7 +110,8 @@ void __udelay(unsigned long usec) if (usec == 0) return; - countticks = lldiv(gd->arch.timer_rate_hz * usec, 1000000); + countticks = lldiv(((unsigned long long)gd->arch.timer_rate_hz * usec), + 1000000); /* decrementing timer */ timeend = readl(&timer_base->counter) - countticks; -- 2.39.5