arm: zynq: correct the argument to lldiv
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Wed, 12 Feb 2014 16:08:35 +0000 (21:38 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 19 Feb 2014 08:41:22 +0000 (09:41 +0100)
Typecast the argument with unsigned long long
for proper calculation of lldiv

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/cpu/armv7/zynq/timer.c

index 174e5a18f674dc6cb6de63984ba97c512dc7ba93..303dbcfceafb3fe6d515a6a091c7ece6061561db 100644 (file)
@@ -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;