aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-msm/timer.c')
-rw-r--r--arch/arm/mach-msm/timer.c31
1 files changed, 5 insertions, 26 deletions
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 476549a8a709..2969027f02fa 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -25,7 +25,6 @@
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26 26
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/hardware/gic.h>
29#include <asm/localtimer.h> 28#include <asm/localtimer.h>
30#include <asm/sched_clock.h> 29#include <asm/sched_clock.h>
31 30
@@ -144,13 +143,9 @@ static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt)
144 evt->rating = msm_clockevent.rating; 143 evt->rating = msm_clockevent.rating;
145 evt->set_mode = msm_timer_set_mode; 144 evt->set_mode = msm_timer_set_mode;
146 evt->set_next_event = msm_timer_set_next_event; 145 evt->set_next_event = msm_timer_set_next_event;
147 evt->shift = msm_clockevent.shift;
148 evt->mult = div_sc(GPT_HZ, NSEC_PER_SEC, evt->shift);
149 evt->max_delta_ns = clockevent_delta2ns(0xf0000000, evt);
150 evt->min_delta_ns = clockevent_delta2ns(4, evt);
151 146
152 *__this_cpu_ptr(msm_evt.percpu_evt) = evt; 147 *__this_cpu_ptr(msm_evt.percpu_evt) = evt;
153 clockevents_register_device(evt); 148 clockevents_config_and_register(evt, GPT_HZ, 4, 0xf0000000);
154 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING); 149 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
155 return 0; 150 return 0;
156} 151}
@@ -229,7 +224,7 @@ static const struct of_device_id msm_gpt_match[] __initconst = {
229 { }, 224 { },
230}; 225};
231 226
232static void __init msm_dt_timer_init(void) 227void __init msm_dt_timer_init(void)
233{ 228{
234 struct device_node *np; 229 struct device_node *np;
235 u32 freq; 230 u32 freq;
@@ -296,10 +291,6 @@ static void __init msm_dt_timer_init(void)
296 291
297 msm_timer_init(freq, 32, irq, !!percpu_offset); 292 msm_timer_init(freq, 32, irq, !!percpu_offset);
298} 293}
299
300struct sys_timer msm_dt_timer = {
301 .init = msm_dt_timer_init
302};
303#endif 294#endif
304 295
305static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) 296static int __init msm_timer_map(phys_addr_t event, phys_addr_t source)
@@ -317,7 +308,7 @@ static int __init msm_timer_map(phys_addr_t event, phys_addr_t source)
317 return 0; 308 return 0;
318} 309}
319 310
320static void __init msm7x01_timer_init(void) 311void __init msm7x01_timer_init(void)
321{ 312{
322 struct clocksource *cs = &msm_clocksource; 313 struct clocksource *cs = &msm_clocksource;
323 314
@@ -330,28 +321,16 @@ static void __init msm7x01_timer_init(void)
330 false); 321 false);
331} 322}
332 323
333struct sys_timer msm7x01_timer = { 324void __init msm7x30_timer_init(void)
334 .init = msm7x01_timer_init
335};
336
337static void __init msm7x30_timer_init(void)
338{ 325{
339 if (msm_timer_map(0xc0100004, 0xc0100024)) 326 if (msm_timer_map(0xc0100004, 0xc0100024))
340 return; 327 return;
341 msm_timer_init(24576000 / 4, 32, 1, false); 328 msm_timer_init(24576000 / 4, 32, 1, false);
342} 329}
343 330
344struct sys_timer msm7x30_timer = { 331void __init qsd8x50_timer_init(void)
345 .init = msm7x30_timer_init
346};
347
348static void __init qsd8x50_timer_init(void)
349{ 332{
350 if (msm_timer_map(0xAC100000, 0xAC100010)) 333 if (msm_timer_map(0xAC100000, 0xAC100010))
351 return; 334 return;
352 msm_timer_init(19200000 / 4, 32, 7, false); 335 msm_timer_init(19200000 / 4, 32, 7, false);
353} 336}
354
355struct sys_timer qsd8x50_timer = {
356 .init = qsd8x50_timer_init
357};