From 4265c35fbcb248e58179007621d61d32d0b3b82a Mon Sep 17 00:00:00 2001 From: Sergei Poselenov Date: Thu, 14 Aug 2008 14:08:28 +0200 Subject: ARM: Use do_div() instead of division for "long long". Signed-off-by: Sergei Poselenov Signed-off-by: Wolfgang Denk --- cpu/arm1176/s3c64xx/interrupts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpu') diff --git a/cpu/arm1176/s3c64xx/interrupts.c b/cpu/arm1176/s3c64xx/interrupts.c index 8356ae49e4..e34369f890 100644 --- a/cpu/arm1176/s3c64xx/interrupts.c +++ b/cpu/arm1176/s3c64xx/interrupts.c @@ -41,6 +41,7 @@ #include #include #include +#include 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) -- cgit