Commit c90a4dd79cb17abb46689f27ff9f1c971362d6e2
Committed by
Wolfgang Denk
1 parent
e21b3dfb0a
Exists in
master
and in
54 other branches
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
post/post.c
... | ... | @@ -24,6 +24,7 @@ |
24 | 24 | #include <common.h> |
25 | 25 | #include <stdio_dev.h> |
26 | 26 | #include <watchdog.h> |
27 | +#include <div64.h> | |
27 | 28 | #include <post.h> |
28 | 29 | |
29 | 30 | #ifdef CONFIG_SYS_POST_HOTKEYS_GPIO |
... | ... | @@ -495,7 +496,7 @@ |
495 | 496 | unsigned long post_time_ms(unsigned long base) |
496 | 497 | { |
497 | 498 | #if defined(CONFIG_PPC) || defined(CONFIG_ARM) |
498 | - return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ)) | |
499 | + return (unsigned long)lldiv(get_ticks(), get_tbclk() / CONFIG_SYS_HZ) | |
499 | 500 | - base; |
500 | 501 | #else |
501 | 502 | #warning "Not implemented yet" |