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 | |
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')
-rw-r--r-- | arch/arm/mach-msm/board-dt-8660.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-dt-8960.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-halibut.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-mahimahi.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-msm7x30.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-qsd8x50.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-sapphire.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-trout.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/common.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-msm/timer.c | 24 |
10 files changed, 21 insertions, 37 deletions
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c index b5b4de2cdf9e..27c41eabfd12 100644 --- a/arch/arm/mach-msm/board-dt-8660.c +++ b/arch/arm/mach-msm/board-dt-8660.c | |||
@@ -59,6 +59,6 @@ DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") | |||
59 | .handle_irq = gic_handle_irq, | 59 | .handle_irq = gic_handle_irq, |
60 | .init_machine = msm8x60_dt_init, | 60 | .init_machine = msm8x60_dt_init, |
61 | .init_late = msm8x60_init_late, | 61 | .init_late = msm8x60_init_late, |
62 | .timer = &msm_dt_timer, | 62 | .init_time = msm_dt_timer_init, |
63 | .dt_compat = msm8x60_fluid_match, | 63 | .dt_compat = msm8x60_fluid_match, |
64 | MACHINE_END | 64 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c index 4490edb71c17..3226d5276962 100644 --- a/arch/arm/mach-msm/board-dt-8960.c +++ b/arch/arm/mach-msm/board-dt-8960.c | |||
@@ -43,7 +43,7 @@ DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") | |||
43 | .smp = smp_ops(msm_smp_ops), | 43 | .smp = smp_ops(msm_smp_ops), |
44 | .map_io = msm_map_msm8960_io, | 44 | .map_io = msm_map_msm8960_io, |
45 | .init_irq = msm_dt_init_irq, | 45 | .init_irq = msm_dt_init_irq, |
46 | .timer = &msm_dt_timer, | 46 | .init_time = msm_dt_timer_init, |
47 | .init_machine = msm_dt_init, | 47 | .init_machine = msm_dt_init, |
48 | .dt_compat = msm8960_dt_match, | 48 | .dt_compat = msm8960_dt_match, |
49 | .handle_irq = gic_handle_irq, | 49 | .handle_irq = gic_handle_irq, |
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 6ce542e2e21c..84d720af34ab 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -106,5 +106,5 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") | |||
106 | .init_irq = halibut_init_irq, | 106 | .init_irq = halibut_init_irq, |
107 | .init_machine = halibut_init, | 107 | .init_machine = halibut_init, |
108 | .init_late = halibut_init_late, | 108 | .init_late = halibut_init_late, |
109 | .timer = &msm7x01_timer, | 109 | .init_time = msm7x01_timer_init, |
110 | MACHINE_END | 110 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c index df00bc03ce74..30c3496db593 100644 --- a/arch/arm/mach-msm/board-mahimahi.c +++ b/arch/arm/mach-msm/board-mahimahi.c | |||
@@ -75,7 +75,7 @@ static void __init mahimahi_init_late(void) | |||
75 | smd_debugfs_init(); | 75 | smd_debugfs_init(); |
76 | } | 76 | } |
77 | 77 | ||
78 | extern struct sys_timer msm_timer; | 78 | void msm_timer_init(void); |
79 | 79 | ||
80 | MACHINE_START(MAHIMAHI, "mahimahi") | 80 | MACHINE_START(MAHIMAHI, "mahimahi") |
81 | .atag_offset = 0x100, | 81 | .atag_offset = 0x100, |
@@ -84,5 +84,5 @@ MACHINE_START(MAHIMAHI, "mahimahi") | |||
84 | .init_irq = msm_init_irq, | 84 | .init_irq = msm_init_irq, |
85 | .init_machine = mahimahi_init, | 85 | .init_machine = mahimahi_init, |
86 | .init_late = mahimahi_init_late, | 86 | .init_late = mahimahi_init_late, |
87 | .timer = &msm_timer, | 87 | .init_time = msm_timer_init, |
88 | MACHINE_END | 88 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index effa6f4336c7..7bc3f82e3ec9 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -131,7 +131,7 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") | |||
131 | .init_irq = msm7x30_init_irq, | 131 | .init_irq = msm7x30_init_irq, |
132 | .init_machine = msm7x30_init, | 132 | .init_machine = msm7x30_init, |
133 | .init_late = msm7x30_init_late, | 133 | .init_late = msm7x30_init_late, |
134 | .timer = &msm7x30_timer, | 134 | .init_time = msm7x30_timer_init, |
135 | MACHINE_END | 135 | MACHINE_END |
136 | 136 | ||
137 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | 137 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") |
@@ -142,7 +142,7 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | |||
142 | .init_irq = msm7x30_init_irq, | 142 | .init_irq = msm7x30_init_irq, |
143 | .init_machine = msm7x30_init, | 143 | .init_machine = msm7x30_init, |
144 | .init_late = msm7x30_init_late, | 144 | .init_late = msm7x30_init_late, |
145 | .timer = &msm7x30_timer, | 145 | .init_time = msm7x30_timer_init, |
146 | MACHINE_END | 146 | MACHINE_END |
147 | 147 | ||
148 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | 148 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") |
@@ -153,5 +153,5 @@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | |||
153 | .init_irq = msm7x30_init_irq, | 153 | .init_irq = msm7x30_init_irq, |
154 | .init_machine = msm7x30_init, | 154 | .init_machine = msm7x30_init, |
155 | .init_late = msm7x30_init_late, | 155 | .init_late = msm7x30_init_late, |
156 | .timer = &msm7x30_timer, | 156 | .init_time = msm7x30_timer_init, |
157 | MACHINE_END | 157 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 2448fcf09eb1..686e7949a73a 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -200,7 +200,7 @@ MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") | |||
200 | .init_irq = qsd8x50_init_irq, | 200 | .init_irq = qsd8x50_init_irq, |
201 | .init_machine = qsd8x50_init, | 201 | .init_machine = qsd8x50_init, |
202 | .init_late = qsd8x50_init_late, | 202 | .init_late = qsd8x50_init_late, |
203 | .timer = &qsd8x50_timer, | 203 | .init_time = qsd8x50_timer_init, |
204 | MACHINE_END | 204 | MACHINE_END |
205 | 205 | ||
206 | MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") | 206 | MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") |
@@ -209,5 +209,5 @@ MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") | |||
209 | .init_irq = qsd8x50_init_irq, | 209 | .init_irq = qsd8x50_init_irq, |
210 | .init_machine = qsd8x50_init, | 210 | .init_machine = qsd8x50_init, |
211 | .init_late = qsd8x50_init_late, | 211 | .init_late = qsd8x50_init_late, |
212 | .timer = &qsd8x50_timer, | 212 | .init_time = qsd8x50_timer_init, |
213 | MACHINE_END | 213 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c index b7b0fc7e3278..70730111b37c 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
@@ -53,7 +53,7 @@ static struct platform_device *devices[] __initdata = { | |||
53 | &msm_device_uart3, | 53 | &msm_device_uart3, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | extern struct sys_timer msm_timer; | 56 | void msm_timer_init(void); |
57 | 57 | ||
58 | static void __init sapphire_init_irq(void) | 58 | static void __init sapphire_init_irq(void) |
59 | { | 59 | { |
@@ -113,5 +113,5 @@ MACHINE_START(SAPPHIRE, "sapphire") | |||
113 | .init_irq = sapphire_init_irq, | 113 | .init_irq = sapphire_init_irq, |
114 | .init_machine = sapphire_init, | 114 | .init_machine = sapphire_init, |
115 | .init_late = sapphire_init_late, | 115 | .init_late = sapphire_init_late, |
116 | .timer = &msm_timer, | 116 | .init_time = msm_timer_init, |
117 | MACHINE_END | 117 | MACHINE_END |
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index 4ba0800e243e..919bfa32871a 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c | |||
@@ -110,5 +110,5 @@ MACHINE_START(TROUT, "HTC Dream") | |||
110 | .init_irq = trout_init_irq, | 110 | .init_irq = trout_init_irq, |
111 | .init_machine = trout_init, | 111 | .init_machine = trout_init, |
112 | .init_late = trout_init_late, | 112 | .init_late = trout_init_late, |
113 | .timer = &msm7x01_timer, | 113 | .init_time = msm7x01_timer_init, |
114 | MACHINE_END | 114 | MACHINE_END |
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h index 633a7159d5ff..ce8215a269e5 100644 --- a/arch/arm/mach-msm/common.h +++ b/arch/arm/mach-msm/common.h | |||
@@ -12,10 +12,10 @@ | |||
12 | #ifndef __MACH_COMMON_H | 12 | #ifndef __MACH_COMMON_H |
13 | #define __MACH_COMMON_H | 13 | #define __MACH_COMMON_H |
14 | 14 | ||
15 | extern struct sys_timer msm7x01_timer; | 15 | extern void msm7x01_timer_init(void); |
16 | extern struct sys_timer msm7x30_timer; | 16 | extern void msm7x30_timer_init(void); |
17 | extern struct sys_timer msm_dt_timer; | 17 | extern void msm_dt_timer_init(void); |
18 | extern struct sys_timer qsd8x50_timer; | 18 | extern void qsd8x50_timer_init(void); |
19 | 19 | ||
20 | extern void msm_map_common_io(void); | 20 | extern void msm_map_common_io(void); |
21 | extern void msm_map_msm7x30_io(void); | 21 | extern void msm_map_msm7x30_io(void); |
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 | }; | ||