summaryrefslogtreecommitdiffstats
path: root/cpu/arm1176/s3c64xx/interrupts.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/arm1176/s3c64xx/interrupts.c')
-rw-r--r--cpu/arm1176/s3c64xx/interrupts.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpu/arm1176/s3c64xx/interrupts.c b/cpu/arm1176/s3c64xx/interrupts.c
index 8356ae49e4..83f3806ac6 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 * CONFIG_SYS_HZ)));
+ return res;
}
ulong get_timer(ulong base)
@@ -158,7 +161,7 @@ ulong get_timer(ulong base)
void set_timer(ulong t)
{
- timestamp = t * (timer_load_val / (100 * CFG_HZ));
+ timestamp = t * (timer_load_val / (100 * CONFIG_SYS_HZ));
}
void udelay(unsigned long usec)
OpenPOWER on IntegriCloud