Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191820
b: refs/heads/master
c: 4ce1755
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed May 2, 2010
1 parent 6842ee7 commit c18c372
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe8e1a57f0ccdaede41618ca9ced7d746b6298d3
refs/heads/master: 4ce1755275c13eb0de90fe23c950bce5e81e680f
12 changes: 5 additions & 7 deletions trunk/arch/arm/plat-versatile/timer-sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@

#include <asm/hardware/arm_timer.h>

#include <mach/platform.h>

#include <plat/timer-sp.h>

/*
* How long is the timer interval?
* These timers are currently always setup to be clocked at 1MHz.
*/
#define TIMER_RELOAD (TICKS_PER_uSEC * mSEC_10)

#define TIMER_FREQ_KHZ (1000)
#define TIMER_RELOAD (TIMER_FREQ_KHZ * 1000 / HZ)

static void __iomem *clksrc_base;

Expand Down Expand Up @@ -65,7 +63,7 @@ void __init sp804_clocksource_init(void __iomem *base)
writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC,
clksrc_base + TIMER_CTRL);

cs->mult = clocksource_khz2mult(1000, cs->shift);
cs->mult = clocksource_khz2mult(TIMER_FREQ_KHZ, cs->shift);
clocksource_register(cs);
}

Expand Down Expand Up @@ -149,7 +147,7 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int timer_irq)
clkevt_base = base;

evt->irq = timer_irq;
evt->mult = div_sc(1000000, NSEC_PER_SEC, evt->shift);
evt->mult = div_sc(TIMER_FREQ_KHZ, NSEC_PER_MSEC, evt->shift);
evt->max_delta_ns = clockevent_delta2ns(0xffffffff, evt);
evt->min_delta_ns = clockevent_delta2ns(0xf, evt);

Expand Down

0 comments on commit c18c372

Please sign in to comment.