diff options
author | Christian Riesch <christian.riesch@omicron.at> | 2011-12-09 16:54:02 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-12-10 23:15:14 +0100 |
commit | c90a4dd79cb17abb46689f27ff9f1c971362d6e2 (patch) | |
tree | c2af72e036dabb84dfa6aa824ef4073b87ac6573 /post | |
parent | e21b3dfb0a971dc8ba307f8af49def0fc6e816ed (diff) |
post/post.c: Use lldiv for 64-bit divisions
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>
Diffstat (limited to 'post')
-rw-r--r-- | post/post.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/post/post.c b/post/post.c index 0e67ad74b7..45e08f8ccc 100644 --- a/post/post.c +++ b/post/post.c @@ -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" |