diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-11-08 14:40:59 -0500 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2012-12-24 11:36:38 -0500 |
commit | 6bb27d7349db51b50c40534710fe164ca0d58902 (patch) | |
tree | 8f227c8bbf27b87275302dc133bb2b949b64622f /arch/arm/mach-msm/timer.c | |
parent | 7704c095230e2e9863f3aacd0489a4b4cc00bf45 (diff) |
ARM: delete struct sys_timer
Now that the only field in struct sys_timer is .init, delete the struct,
and replace the machine descriptor .timer field with the initialization
function itself.
This will enable moving timer drivers into drivers/clocksource without
having to place a public prototype of each struct sys_timer object into
include/linux; the intent is to create a single of_clocksource_init()
function that determines which timer driver to initialize by scanning
the device dtree, much like the proposed irqchip_init() at:
http://www.spinics.net/lists/arm-kernel/msg203686.html
Includes mach-omap2 fixes from Igor Grinberg.
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-msm/timer.c')
-rw-r--r-- | arch/arm/mach-msm/timer.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 476549a8a709..2fb5f3eec50f 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -229,7 +229,7 @@ static const struct of_device_id msm_gpt_match[] __initconst = { | |||
229 | { }, | 229 | { }, |
230 | }; | 230 | }; |
231 | 231 | ||
232 | static void __init msm_dt_timer_init(void) | 232 | void __init msm_dt_timer_init(void) |
233 | { | 233 | { |
234 | struct device_node *np; | 234 | struct device_node *np; |
235 | u32 freq; | 235 | u32 freq; |
@@ -296,10 +296,6 @@ static void __init msm_dt_timer_init(void) | |||
296 | 296 | ||
297 | msm_timer_init(freq, 32, irq, !!percpu_offset); | 297 | msm_timer_init(freq, 32, irq, !!percpu_offset); |
298 | } | 298 | } |
299 | |||
300 | struct sys_timer msm_dt_timer = { | ||
301 | .init = msm_dt_timer_init | ||
302 | }; | ||
303 | #endif | 299 | #endif |
304 | 300 | ||
305 | static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) | 301 | static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) |
@@ -317,7 +313,7 @@ static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) | |||
317 | return 0; | 313 | return 0; |
318 | } | 314 | } |
319 | 315 | ||
320 | static void __init msm7x01_timer_init(void) | 316 | void __init msm7x01_timer_init(void) |
321 | { | 317 | { |
322 | struct clocksource *cs = &msm_clocksource; | 318 | struct clocksource *cs = &msm_clocksource; |
323 | 319 | ||
@@ -330,28 +326,16 @@ static void __init msm7x01_timer_init(void) | |||
330 | false); | 326 | false); |
331 | } | 327 | } |
332 | 328 | ||
333 | struct sys_timer msm7x01_timer = { | 329 | void __init msm7x30_timer_init(void) |
334 | .init = msm7x01_timer_init | ||
335 | }; | ||
336 | |||
337 | static void __init msm7x30_timer_init(void) | ||
338 | { | 330 | { |
339 | if (msm_timer_map(0xc0100004, 0xc0100024)) | 331 | if (msm_timer_map(0xc0100004, 0xc0100024)) |
340 | return; | 332 | return; |
341 | msm_timer_init(24576000 / 4, 32, 1, false); | 333 | msm_timer_init(24576000 / 4, 32, 1, false); |
342 | } | 334 | } |
343 | 335 | ||
344 | struct sys_timer msm7x30_timer = { | 336 | void __init qsd8x50_timer_init(void) |
345 | .init = msm7x30_timer_init | ||
346 | }; | ||
347 | |||
348 | static void __init qsd8x50_timer_init(void) | ||
349 | { | 337 | { |
350 | if (msm_timer_map(0xAC100000, 0xAC100010)) | 338 | if (msm_timer_map(0xAC100000, 0xAC100010)) |
351 | return; | 339 | return; |
352 | msm_timer_init(19200000 / 4, 32, 7, false); | 340 | msm_timer_init(19200000 / 4, 32, 7, false); |
353 | } | 341 | } |
354 | |||
355 | struct sys_timer qsd8x50_timer = { | ||
356 | .init = qsd8x50_timer_init | ||
357 | }; | ||