ARM: Use do_div() instead of division for "long long".
[oweals/u-boot.git] / cpu / arm1176 / s3c64xx / interrupts.c
index 8356ae49e4364d07727a97f8b0d89d190bcf0f1e..e34369f890929f364c73908fe8952ad295a11350 100644 (file)
@@ -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)