diff options
author | Sergei Poselenov <sposelenov@emcraft.com> | 2008-08-14 14:08:28 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-09-09 02:14:41 +0200 |
commit | 4265c35fbcb248e58179007621d61d32d0b3b82a (patch) | |
tree | 4a97e0570b7b11a9ae895bf9fd0be14d51461b0f /board/integratorcp | |
parent | 1055171ed05b7c4885737463d52b8d6c013bcb5d (diff) | |
download | u-boot-imx-4265c35fbcb248e58179007621d61d32d0b3b82a.zip u-boot-imx-4265c35fbcb248e58179007621d61d32d0b3b82a.tar.gz u-boot-imx-4265c35fbcb248e58179007621d61d32d0b3b82a.tar.bz2 |
ARM: Use do_div() instead of division for "long long".
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/integratorcp')
-rw-r--r-- | board/integratorcp/integratorcp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/board/integratorcp/integratorcp.c b/board/integratorcp/integratorcp.c index d6d6e13..220513f 100644 --- a/board/integratorcp/integratorcp.c +++ b/board/integratorcp/integratorcp.c @@ -34,6 +34,7 @@ */ #include <common.h> +#include <div64.h> DECLARE_GLOBAL_DATA_PTR; @@ -244,7 +245,11 @@ ulong get_timer_masked (void) total_count += lastdec - now; } lastdec = now; - timestamp = (ulong)(total_count/div_timer); + + /* Reuse "now" */ + now = total_count; + do_div(now, div_timer); + timestamp = now; return timestamp; } |