aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mmp/time.c')
-rw-r--r--arch/arm/mach-mmp/time.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 024022d91fe3..2756351dbb35 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -39,6 +39,12 @@
39 39
40#include "clock.h" 40#include "clock.h"
41 41
42#ifdef CONFIG_CPU_MMP2
43#define MMP_CLOCK_FREQ 6500000
44#else
45#define MMP_CLOCK_FREQ 3250000
46#endif
47
42#define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE 48#define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
43 49
44#define MAX_DELTA (0xfffffffe) 50#define MAX_DELTA (0xfffffffe)
@@ -186,7 +192,7 @@ static void __init timer_config(void)
186 192
187static struct irqaction timer_irq = { 193static struct irqaction timer_irq = {
188 .name = "timer", 194 .name = "timer",
189 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, 195 .flags = IRQF_TIMER | IRQF_IRQPOLL,
190 .handler = timer_interrupt, 196 .handler = timer_interrupt,
191 .dev_id = &ckevt, 197 .dev_id = &ckevt,
192}; 198};
@@ -195,14 +201,14 @@ void __init timer_init(int irq)
195{ 201{
196 timer_config(); 202 timer_config();
197 203
198 sched_clock_register(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); 204 sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
199 205
200 ckevt.cpumask = cpumask_of(0); 206 ckevt.cpumask = cpumask_of(0);
201 207
202 setup_irq(irq, &timer_irq); 208 setup_irq(irq, &timer_irq);
203 209
204 clocksource_register_hz(&cksrc, CLOCK_TICK_RATE); 210 clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
205 clockevents_config_and_register(&ckevt, CLOCK_TICK_RATE, 211 clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
206 MIN_DELTA, MAX_DELTA); 212 MIN_DELTA, MAX_DELTA);
207} 213}
208 214