]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/commitdiff
post/post.c: Use lldiv for 64-bit divisions
authorChristian Riesch <christian.riesch@omicron.at>
Fri, 9 Dec 2011 15:54:02 +0000 (16:54 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 10 Dec 2011 22:15:14 +0000 (23:15 +0100)
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Tom Rini <trini@ti.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
post/post.c

index 0e67ad74b779039ae73f4f5483528bc7382805de..45e08f8ccc76c2b2c57e1786007d26abb5f4dcdb 100644 (file)
@@ -24,6 +24,7 @@
 #include <common.h>
 #include <stdio_dev.h>
 #include <watchdog.h>
+#include <div64.h>
 #include <post.h>
 
 #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO
@@ -495,7 +496,7 @@ void post_reloc(void)
 unsigned long post_time_ms(unsigned long base)
 {
 #if defined(CONFIG_PPC) || defined(CONFIG_ARM)
-       return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ))
+       return (unsigned long)lldiv(get_ticks(), get_tbclk() / CONFIG_SYS_HZ)
                - base;
 #else
 #warning "Not implemented yet"