summaryrefslogtreecommitdiff
path: root/cpu/arm1176/s3c64xx/interrupts.c
diff options
context:
space:
mode:
authorSergei Poselenov <sposelenov@emcraft.com>2008-08-14 14:08:28 +0200
committerWolfgang Denk <wd@denx.de>2008-09-09 02:14:41 +0200
commit4265c35fbcb248e58179007621d61d32d0b3b82a (patch)
tree4a97e0570b7b11a9ae895bf9fd0be14d51461b0f /cpu/arm1176/s3c64xx/interrupts.c
parent1055171ed05b7c4885737463d52b8d6c013bcb5d (diff)
downloadu-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 'cpu/arm1176/s3c64xx/interrupts.c')
-rw-r--r--cpu/arm1176/s3c64xx/interrupts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpu/arm1176/s3c64xx/interrupts.c b/cpu/arm1176/s3c64xx/interrupts.c
index 8356ae4..e34369f 100644
--- a/cpu/arm1176/s3c64xx/interrupts.c
+++ b/cpu/arm1176/s3c64xx/interrupts.c
@@ -41,6 +41,7 @@
#include <common.h>
#include <asm/proc-armv/ptrace.h>
#include <s3c6400.h>
+#include <div64.h>
static ulong timer_load_val;
@@ -148,7 +149,9 @@ void reset_timer(void)
ulong get_timer_masked(void)
{
- return get_ticks() / (timer_load_val / (100 * CFG_HZ));
+ unsigned long long res = get_ticks();
+ do_div (res, (timer_load_val / (100 * CFG_HZ)));
+ return res;
}
ulong get_timer(ulong base)