aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-prima2/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-prima2/timer.c')
-rw-r--r--arch/arm/mach-prima2/timer.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index d95bf252f694..a7a2c199c3ea 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -175,19 +175,13 @@ static u32 notrace sirfsoc_read_sched_clock(void)
175 175
176static void __init sirfsoc_clockevent_init(void) 176static void __init sirfsoc_clockevent_init(void)
177{ 177{
178 clockevents_calc_mult_shift(&sirfsoc_clockevent, CLOCK_TICK_RATE, 60);
179
180 sirfsoc_clockevent.max_delta_ns =
181 clockevent_delta2ns(-2, &sirfsoc_clockevent);
182 sirfsoc_clockevent.min_delta_ns =
183 clockevent_delta2ns(2, &sirfsoc_clockevent);
184
185 sirfsoc_clockevent.cpumask = cpumask_of(0); 178 sirfsoc_clockevent.cpumask = cpumask_of(0);
186 clockevents_register_device(&sirfsoc_clockevent); 179 clockevents_config_and_register(&sirfsoc_clockevent, CLOCK_TICK_RATE,
180 2, -2);
187} 181}
188 182
189/* initialize the kernel jiffy timer source */ 183/* initialize the kernel jiffy timer source */
190static void __init sirfsoc_timer_init(void) 184void __init sirfsoc_timer_init(void)
191{ 185{
192 unsigned long rate; 186 unsigned long rate;
193 struct clk *clk; 187 struct clk *clk;
@@ -226,7 +220,7 @@ static struct of_device_id timer_ids[] = {
226 {}, 220 {},
227}; 221};
228 222
229static void __init sirfsoc_of_timer_map(void) 223void __init sirfsoc_of_timer_map(void)
230{ 224{
231 struct device_node *np; 225 struct device_node *np;
232 const unsigned int *intspec; 226 const unsigned int *intspec;
@@ -245,7 +239,3 @@ static void __init sirfsoc_of_timer_map(void)
245 239
246 of_node_put(np); 240 of_node_put(np);
247} 241}
248
249struct sys_timer sirfsoc_timer = {
250 .init = sirfsoc_timer_init,
251};