[U-Boot] [PATCH 2/5] ARM:zynq: Correct __udelay to use lldiv

Tom Rini trini at ti.com
Thu Dec 5 20:48:36 CET 2013


Cc: Michal Simek <monstr at monstr.eu>
Signed-off-by: Tom Rini <trini at ti.com>
---
 arch/arm/cpu/armv7/zynq/timer.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/zynq/timer.c b/arch/arm/cpu/armv7/zynq/timer.c
index 636322a..2be253c 100644
--- a/arch/arm/cpu/armv7/zynq/timer.c
+++ b/arch/arm/cpu/armv7/zynq/timer.c
@@ -107,8 +107,7 @@ void __udelay(unsigned long usec)
 	if (usec == 0)
 		return;
 
-	countticks = (u32) (((unsigned long long) TIMER_TICK_HZ * usec) /
-								1000000);
+	countticks = lldiv(TIMER_TICK_HZ * usec, 1000000);
 
 	/* decrementing timer */
 	timeend = readl(&timer_base->counter) - countticks;
-- 
1.7.9.5



More information about the U-Boot mailing list