aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-01-08 08:53:33 -0500
committerOlof Johansson <olof@lixom.net>2013-01-08 08:53:53 -0500
commit981302783e891482d767ce90b04ed37159d2ebf8 (patch)
tree02947bcb4641d9db548e36b8491f190ebd9578f6 /arch/arm/mach-omap2
parentd1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff)
parentae278a935f086775e8ae31a8ec9f7224ea25ea3c (diff)
Merge tag 'swarren-for-3.9-arm-timer-rework' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/cleanup
From Stephen Warren: ARM/...: timer and clock events cleanup, and remove struct sys_timer This branch contains a number of cleanups and unifications to various timer- clock-events- and ARM timer code. The main points are: 1) Convert arch_gettimeoffset to a pointer, so that architectures with multiple timer implementations can simply set this standard pointer rather than maintaining their own arch-specific pointers for the same purpose. Various architectures are converted to using this new feature. 2) Conversion of ARM timer implementations to use clock_event_devices's suspend/resume operations, rather than the ARM-specific sys_timer versions. Thus, the ARM code begins to use more common infra-structure rather than arch-specific code. 3) Removal of ARM's struct sys_timer completely, now that everything uses common code. 4) Introduction of drivers/clocksource/clksrc-of.c, which allows ARM clock source implementations to be moved into drivers/clocksource, with the need to add SoC-specific header files for each timer initialization function; instead, all enabled implementations are registered into a table which a single core function iterates over, and calls the relevant initialization functions based on device tree. At least the Tegra and BCM2835 clocksource implementations will use this feature in the 3.9 kernel cycle. * tag 'swarren-for-3.9-arm-timer-rework' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: clocksource: add common of_clksrc_init() function ARM: delete struct sys_timer ARM: remove struct sys_timer suspend and resume fields ARM: samsung: register syscore_ops for timer resume directly ARM: ux500: convert timer suspend/resume to clock_event_device ARM: sa1100: convert timer suspend/resume to clock_event_device ARM: pxa: convert timer suspend/resume to clock_event_device ARM: at91: convert timer suspend/resume to clock_event_device ARM: set arch_gettimeoffset directly m68k: set arch_gettimeoffset directly time: convert arch_gettimeoffset to a pointer cris: move usec/nsec conversion to do_slow_gettimeoffset Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c2
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c4
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c2
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c2
-rw-r--r--arch/arm/mach-omap2/board-generic.c14
-rw-r--r--arch/arm/mach-omap2/board-h4.c2
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c4
-rw-r--r--arch/arm/mach-omap2/board-ldp.c2
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c6
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c4
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c2
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c2
-rw-r--r--arch/arm/mach-omap2/board-overo.c2
-rw-r--r--arch/arm/mach-omap2/board-rm680.c4
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c4
-rw-r--r--arch/arm/mach-omap2/board-zoom.c4
-rw-r--r--arch/arm/mach-omap2/common.h14
-rw-r--r--arch/arm/mach-omap2/timer.c22
29 files changed, 53 insertions, 65 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 4815ea6f8f5d..5f413968d568 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -284,6 +284,6 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
284 .handle_irq = omap2_intc_handle_irq, 284 .handle_irq = omap2_intc_handle_irq,
285 .init_machine = omap_2430sdp_init, 285 .init_machine = omap_2430sdp_init,
286 .init_late = omap2430_init_late, 286 .init_late = omap2430_init_late,
287 .timer = &omap2_timer, 287 .init_time = omap2_sync32k_timer_init,
288 .restart = omap2xxx_restart, 288 .restart = omap2xxx_restart,
289MACHINE_END 289MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index bb73afc9ac17..8e2513f6a282 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -597,6 +597,6 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
597 .handle_irq = omap3_intc_handle_irq, 597 .handle_irq = omap3_intc_handle_irq,
598 .init_machine = omap_3430sdp_init, 598 .init_machine = omap_3430sdp_init,
599 .init_late = omap3430_init_late, 599 .init_late = omap3430_init_late,
600 .timer = &omap3_timer, 600 .init_time = omap3_sync32k_timer_init,
601 .restart = omap3xxx_restart, 601 .restart = omap3xxx_restart,
602MACHINE_END 602MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 050aaa771254..33846274bb8a 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -211,6 +211,6 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
211 .handle_irq = omap3_intc_handle_irq, 211 .handle_irq = omap3_intc_handle_irq,
212 .init_machine = omap_sdp_init, 212 .init_machine = omap_sdp_init,
213 .init_late = omap3630_init_late, 213 .init_late = omap3630_init_late,
214 .timer = &omap3_timer, 214 .init_time = omap3_sync32k_timer_init,
215 .restart = omap3xxx_restart, 215 .restart = omap3xxx_restart,
216MACHINE_END 216MACHINE_END
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1cc6696594fd..f5d5f5941d7d 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -725,6 +725,6 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
725 .handle_irq = gic_handle_irq, 725 .handle_irq = gic_handle_irq,
726 .init_machine = omap_4430sdp_init, 726 .init_machine = omap_4430sdp_init,
727 .init_late = omap4430_init_late, 727 .init_late = omap4430_init_late,
728 .timer = &omap4_timer, 728 .init_time = omap4_local_timer_init,
729 .restart = omap44xx_restart, 729 .restart = omap44xx_restart,
730MACHINE_END 730MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 51b96a1206d1..07f0be24a5d1 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -92,6 +92,6 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
92 .handle_irq = omap3_intc_handle_irq, 92 .handle_irq = omap3_intc_handle_irq,
93 .init_machine = am3517_crane_init, 93 .init_machine = am3517_crane_init,
94 .init_late = am35xx_init_late, 94 .init_late = am35xx_init_late,
95 .timer = &omap3_timer, 95 .init_time = omap3_sync32k_timer_init,
96 .restart = omap3xxx_restart, 96 .restart = omap3xxx_restart,
97MACHINE_END 97MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index f81a303b87ff..6f5b2a05f4b2 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -393,6 +393,6 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
393 .handle_irq = omap3_intc_handle_irq, 393 .handle_irq = omap3_intc_handle_irq,
394 .init_machine = am3517_evm_init, 394 .init_machine = am3517_evm_init,
395 .init_late = am35xx_init_late, 395 .init_late = am35xx_init_late,
396 .timer = &omap3_timer, 396 .init_time = omap3_sync32k_timer_init,
397 .restart = omap3xxx_restart, 397 .restart = omap3xxx_restart,
398MACHINE_END 398MACHINE_END
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 5d0a61f54165..3a6ca74709ab 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -337,6 +337,6 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
337 .handle_irq = omap2_intc_handle_irq, 337 .handle_irq = omap2_intc_handle_irq,
338 .init_machine = omap_apollon_init, 338 .init_machine = omap_apollon_init,
339 .init_late = omap2420_init_late, 339 .init_late = omap2420_init_late,
340 .timer = &omap2_timer, 340 .init_time = omap2_sync32k_timer_init,
341 .restart = omap2xxx_restart, 341 .restart = omap2xxx_restart,
342MACHINE_END 342MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index b3102c2f4a3c..68647c389190 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -751,7 +751,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
751 .handle_irq = omap3_intc_handle_irq, 751 .handle_irq = omap3_intc_handle_irq,
752 .init_machine = cm_t35_init, 752 .init_machine = cm_t35_init,
753 .init_late = omap35xx_init_late, 753 .init_late = omap35xx_init_late,
754 .timer = &omap3_timer, 754 .init_time = omap3_sync32k_timer_init,
755 .restart = omap3xxx_restart, 755 .restart = omap3xxx_restart,
756MACHINE_END 756MACHINE_END
757 757
@@ -764,6 +764,6 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730")
764 .handle_irq = omap3_intc_handle_irq, 764 .handle_irq = omap3_intc_handle_irq,
765 .init_machine = cm_t3730_init, 765 .init_machine = cm_t3730_init,
766 .init_late = omap3630_init_late, 766 .init_late = omap3630_init_late,
767 .timer = &omap3_timer, 767 .init_time = omap3_sync32k_timer_init,
768 .restart = omap3xxx_restart, 768 .restart = omap3xxx_restart,
769MACHINE_END 769MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index ebbc2adb499e..6a9529ab95cd 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -297,6 +297,6 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
297 .handle_irq = omap3_intc_handle_irq, 297 .handle_irq = omap3_intc_handle_irq,
298 .init_machine = cm_t3517_init, 298 .init_machine = cm_t3517_init,
299 .init_late = am35xx_init_late, 299 .init_late = am35xx_init_late,
300 .timer = &omap3_gp_timer, 300 .init_time = omap3_gp_gptimer_timer_init,
301 .restart = omap3xxx_restart, 301 .restart = omap3xxx_restart,
302MACHINE_END 302MACHINE_END
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 12865af25d3a..0b1d8f758088 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -643,6 +643,6 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
643 .handle_irq = omap3_intc_handle_irq, 643 .handle_irq = omap3_intc_handle_irq,
644 .init_machine = devkit8000_init, 644 .init_machine = devkit8000_init,
645 .init_late = omap35xx_init_late, 645 .init_late = omap35xx_init_late,
646 .timer = &omap3_secure_timer, 646 .init_time = omap3_secure_sync32k_timer_init,
647 .restart = omap3xxx_restart, 647 .restart = omap3xxx_restart,
648MACHINE_END 648MACHINE_END
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 53cb380b7877..8a5f814613c6 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -65,7 +65,7 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
65 .init_irq = omap_intc_of_init, 65 .init_irq = omap_intc_of_init,
66 .handle_irq = omap2_intc_handle_irq, 66 .handle_irq = omap2_intc_handle_irq,
67 .init_machine = omap_generic_init, 67 .init_machine = omap_generic_init,
68 .timer = &omap2_timer, 68 .init_time = omap2_sync32k_timer_init,
69 .dt_compat = omap242x_boards_compat, 69 .dt_compat = omap242x_boards_compat,
70 .restart = omap2xxx_restart, 70 .restart = omap2xxx_restart,
71MACHINE_END 71MACHINE_END
@@ -84,7 +84,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
84 .init_irq = omap_intc_of_init, 84 .init_irq = omap_intc_of_init,
85 .handle_irq = omap2_intc_handle_irq, 85 .handle_irq = omap2_intc_handle_irq,
86 .init_machine = omap_generic_init, 86 .init_machine = omap_generic_init,
87 .timer = &omap2_timer, 87 .init_time = omap2_sync32k_timer_init,
88 .dt_compat = omap243x_boards_compat, 88 .dt_compat = omap243x_boards_compat,
89 .restart = omap2xxx_restart, 89 .restart = omap2xxx_restart,
90MACHINE_END 90MACHINE_END
@@ -103,7 +103,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
103 .init_irq = omap_intc_of_init, 103 .init_irq = omap_intc_of_init,
104 .handle_irq = omap3_intc_handle_irq, 104 .handle_irq = omap3_intc_handle_irq,
105 .init_machine = omap_generic_init, 105 .init_machine = omap_generic_init,
106 .timer = &omap3_timer, 106 .init_time = omap3_sync32k_timer_init,
107 .dt_compat = omap3_boards_compat, 107 .dt_compat = omap3_boards_compat,
108 .restart = omap3xxx_restart, 108 .restart = omap3xxx_restart,
109MACHINE_END 109MACHINE_END
@@ -120,7 +120,7 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)")
120 .init_irq = omap_intc_of_init, 120 .init_irq = omap_intc_of_init,
121 .handle_irq = omap3_intc_handle_irq, 121 .handle_irq = omap3_intc_handle_irq,
122 .init_machine = omap_generic_init, 122 .init_machine = omap_generic_init,
123 .timer = &omap3_secure_timer, 123 .init_time = omap3_secure_sync32k_timer_init,
124 .dt_compat = omap3_gp_boards_compat, 124 .dt_compat = omap3_gp_boards_compat,
125 .restart = omap3xxx_restart, 125 .restart = omap3xxx_restart,
126MACHINE_END 126MACHINE_END
@@ -139,7 +139,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
139 .init_irq = omap_intc_of_init, 139 .init_irq = omap_intc_of_init,
140 .handle_irq = omap3_intc_handle_irq, 140 .handle_irq = omap3_intc_handle_irq,
141 .init_machine = omap_generic_init, 141 .init_machine = omap_generic_init,
142 .timer = &omap3_am33xx_timer, 142 .init_time = omap3_am33xx_gptimer_timer_init,
143 .dt_compat = am33xx_boards_compat, 143 .dt_compat = am33xx_boards_compat,
144MACHINE_END 144MACHINE_END
145#endif 145#endif
@@ -159,7 +159,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
159 .handle_irq = gic_handle_irq, 159 .handle_irq = gic_handle_irq,
160 .init_machine = omap_generic_init, 160 .init_machine = omap_generic_init,
161 .init_late = omap4430_init_late, 161 .init_late = omap4430_init_late,
162 .timer = &omap4_timer, 162 .init_time = omap4_local_timer_init,
163 .dt_compat = omap4_boards_compat, 163 .dt_compat = omap4_boards_compat,
164 .restart = omap44xx_restart, 164 .restart = omap44xx_restart,
165MACHINE_END 165MACHINE_END
@@ -179,7 +179,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
179 .init_irq = omap_gic_of_init, 179 .init_irq = omap_gic_of_init,
180 .handle_irq = gic_handle_irq, 180 .handle_irq = gic_handle_irq,
181 .init_machine = omap_generic_init, 181 .init_machine = omap_generic_init,
182 .timer = &omap5_timer, 182 .init_time = omap5_realtime_timer_init,
183 .dt_compat = omap5_boards_compat, 183 .dt_compat = omap5_boards_compat,
184 .restart = omap44xx_restart, 184 .restart = omap44xx_restart,
185MACHINE_END 185MACHINE_END
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 3be1311f9e33..812c829fa46f 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -342,6 +342,6 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
342 .handle_irq = omap2_intc_handle_irq, 342 .handle_irq = omap2_intc_handle_irq,
343 .init_machine = omap_h4_init, 343 .init_machine = omap_h4_init,
344 .init_late = omap2420_init_late, 344 .init_late = omap2420_init_late,
345 .timer = &omap2_timer, 345 .init_time = omap2_sync32k_timer_init,
346 .restart = omap2xxx_restart, 346 .restart = omap2xxx_restart,
347MACHINE_END 347MACHINE_END
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0f24cb84ba5a..5b447649f5a0 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -655,7 +655,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
655 .handle_irq = omap3_intc_handle_irq, 655 .handle_irq = omap3_intc_handle_irq,
656 .init_machine = igep_init, 656 .init_machine = igep_init,
657 .init_late = omap35xx_init_late, 657 .init_late = omap35xx_init_late,
658 .timer = &omap3_timer, 658 .init_time = omap3_sync32k_timer_init,
659 .restart = omap3xxx_restart, 659 .restart = omap3xxx_restart,
660MACHINE_END 660MACHINE_END
661 661
@@ -668,6 +668,6 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
668 .handle_irq = omap3_intc_handle_irq, 668 .handle_irq = omap3_intc_handle_irq,
669 .init_machine = igep_init, 669 .init_machine = igep_init,
670 .init_late = omap35xx_init_late, 670 .init_late = omap35xx_init_late,
671 .timer = &omap3_timer, 671 .init_time = omap3_sync32k_timer_init,
672 .restart = omap3xxx_restart, 672 .restart = omap3xxx_restart,
673MACHINE_END 673MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 0869f4f3d3e1..ff440c0d04dd 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -435,6 +435,6 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
435 .handle_irq = omap3_intc_handle_irq, 435 .handle_irq = omap3_intc_handle_irq,
436 .init_machine = omap_ldp_init, 436 .init_machine = omap_ldp_init,
437 .init_late = omap3430_init_late, 437 .init_late = omap3430_init_late,
438 .timer = &omap3_timer, 438 .init_time = omap3_sync32k_timer_init,
439 .restart = omap3xxx_restart, 439 .restart = omap3xxx_restart,
440MACHINE_END 440MACHINE_END
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 0abb30fe399c..f6eeb87e4e95 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -731,7 +731,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
731 .handle_irq = omap2_intc_handle_irq, 731 .handle_irq = omap2_intc_handle_irq,
732 .init_machine = n8x0_init_machine, 732 .init_machine = n8x0_init_machine,
733 .init_late = omap2420_init_late, 733 .init_late = omap2420_init_late,
734 .timer = &omap2_timer, 734 .init_time = omap2_sync32k_timer_init,
735 .restart = omap2xxx_restart, 735 .restart = omap2xxx_restart,
736MACHINE_END 736MACHINE_END
737 737
@@ -744,7 +744,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
744 .handle_irq = omap2_intc_handle_irq, 744 .handle_irq = omap2_intc_handle_irq,
745 .init_machine = n8x0_init_machine, 745 .init_machine = n8x0_init_machine,
746 .init_late = omap2420_init_late, 746 .init_late = omap2420_init_late,
747 .timer = &omap2_timer, 747 .init_time = omap2_sync32k_timer_init,
748 .restart = omap2xxx_restart, 748 .restart = omap2xxx_restart,
749MACHINE_END 749MACHINE_END
750 750
@@ -757,6 +757,6 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
757 .handle_irq = omap2_intc_handle_irq, 757 .handle_irq = omap2_intc_handle_irq,
758 .init_machine = n8x0_init_machine, 758 .init_machine = n8x0_init_machine,
759 .init_late = omap2420_init_late, 759 .init_late = omap2420_init_late,
760 .timer = &omap2_timer, 760 .init_time = omap2_sync32k_timer_init,
761 .restart = omap2xxx_restart, 761 .restart = omap2xxx_restart,
762MACHINE_END 762MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 22c483d5dfa8..b81b4585f46f 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -544,6 +544,6 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
544 .handle_irq = omap3_intc_handle_irq, 544 .handle_irq = omap3_intc_handle_irq,
545 .init_machine = omap3_beagle_init, 545 .init_machine = omap3_beagle_init,
546 .init_late = omap3_init_late, 546 .init_late = omap3_init_late,
547 .timer = &omap3_secure_timer, 547 .init_time = omap3_secure_sync32k_timer_init,
548 .restart = omap3xxx_restart, 548 .restart = omap3xxx_restart,
549MACHINE_END 549MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3985f35aee06..f2f636b19762 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -757,6 +757,6 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
757 .handle_irq = omap3_intc_handle_irq, 757 .handle_irq = omap3_intc_handle_irq,
758 .init_machine = omap3_evm_init, 758 .init_machine = omap3_evm_init,
759 .init_late = omap35xx_init_late, 759 .init_late = omap35xx_init_late,
760 .timer = &omap3_timer, 760 .init_time = omap3_sync32k_timer_init,
761 .restart = omap3xxx_restart, 761 .restart = omap3xxx_restart,
762MACHINE_END 762MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 2a065ba6eb58..0fba43a9b07d 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -231,7 +231,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
231 .handle_irq = omap3_intc_handle_irq, 231 .handle_irq = omap3_intc_handle_irq,
232 .init_machine = omap3logic_init, 232 .init_machine = omap3logic_init,
233 .init_late = omap35xx_init_late, 233 .init_late = omap35xx_init_late,
234 .timer = &omap3_timer, 234 .init_time = omap3_sync32k_timer_init,
235 .restart = omap3xxx_restart, 235 .restart = omap3xxx_restart,
236MACHINE_END 236MACHINE_END
237 237
@@ -244,6 +244,6 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
244 .handle_irq = omap3_intc_handle_irq, 244 .handle_irq = omap3_intc_handle_irq,
245 .init_machine = omap3logic_init, 245 .init_machine = omap3logic_init,
246 .init_late = omap35xx_init_late, 246 .init_late = omap35xx_init_late,
247 .timer = &omap3_timer, 247 .init_time = omap3_sync32k_timer_init,
248 .restart = omap3xxx_restart, 248 .restart = omap3xxx_restart,
249MACHINE_END 249MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index a53a6683c1b8..12e181689340 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -618,6 +618,6 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
618 .handle_irq = omap3_intc_handle_irq, 618 .handle_irq = omap3_intc_handle_irq,
619 .init_machine = omap3pandora_init, 619 .init_machine = omap3pandora_init,
620 .init_late = omap35xx_init_late, 620 .init_late = omap35xx_init_late,
621 .timer = &omap3_timer, 621 .init_time = omap3_sync32k_timer_init,
622 .restart = omap3xxx_restart, 622 .restart = omap3xxx_restart,
623MACHINE_END 623MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 53a6cbcf9747..13ee40545604 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -427,6 +427,6 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
427 .handle_irq = omap3_intc_handle_irq, 427 .handle_irq = omap3_intc_handle_irq,
428 .init_machine = omap3_stalker_init, 428 .init_machine = omap3_stalker_init,
429 .init_late = omap35xx_init_late, 429 .init_late = omap35xx_init_late,
430 .timer = &omap3_secure_timer, 430 .init_time = omap3_secure_sync32k_timer_init,
431 .restart = omap3xxx_restart, 431 .restart = omap3xxx_restart,
432MACHINE_END 432MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 263cb9cfbf37..36c455c85ed9 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -386,6 +386,6 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
386 .handle_irq = omap3_intc_handle_irq, 386 .handle_irq = omap3_intc_handle_irq,
387 .init_machine = omap3_touchbook_init, 387 .init_machine = omap3_touchbook_init,
388 .init_late = omap3430_init_late, 388 .init_late = omap3430_init_late,
389 .timer = &omap3_secure_timer, 389 .init_time = omap3_secure_sync32k_timer_init,
390 .restart = omap3xxx_restart, 390 .restart = omap3xxx_restart,
391MACHINE_END 391MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 5c8e9cee2c2e..ed8240c1a9b9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -456,6 +456,6 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
456 .handle_irq = gic_handle_irq, 456 .handle_irq = gic_handle_irq,
457 .init_machine = omap4_panda_init, 457 .init_machine = omap4_panda_init,
458 .init_late = omap4430_init_late, 458 .init_late = omap4430_init_late,
459 .timer = &omap4_timer, 459 .init_time = omap4_local_timer_init,
460 .restart = omap44xx_restart, 460 .restart = omap44xx_restart,
461MACHINE_END 461MACHINE_END
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index c8fde3e56441..233a37d541c3 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -551,6 +551,6 @@ MACHINE_START(OVERO, "Gumstix Overo")
551 .handle_irq = omap3_intc_handle_irq, 551 .handle_irq = omap3_intc_handle_irq,
552 .init_machine = overo_init, 552 .init_machine = overo_init,
553 .init_late = omap35xx_init_late, 553 .init_late = omap35xx_init_late,
554 .timer = &omap3_timer, 554 .init_time = omap3_sync32k_timer_init,
555 .restart = omap3xxx_restart, 555 .restart = omap3xxx_restart,
556MACHINE_END 556MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0c777b75e484..386a2ddc1173 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -147,7 +147,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
147 .handle_irq = omap3_intc_handle_irq, 147 .handle_irq = omap3_intc_handle_irq,
148 .init_machine = rm680_init, 148 .init_machine = rm680_init,
149 .init_late = omap3630_init_late, 149 .init_late = omap3630_init_late,
150 .timer = &omap3_timer, 150 .init_time = omap3_sync32k_timer_init,
151 .restart = omap3xxx_restart, 151 .restart = omap3xxx_restart,
152MACHINE_END 152MACHINE_END
153 153
@@ -160,6 +160,6 @@ MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
160 .handle_irq = omap3_intc_handle_irq, 160 .handle_irq = omap3_intc_handle_irq,
161 .init_machine = rm680_init, 161 .init_machine = rm680_init,
162 .init_late = omap3630_init_late, 162 .init_late = omap3630_init_late,
163 .timer = &omap3_timer, 163 .init_time = omap3_sync32k_timer_init,
164 .restart = omap3xxx_restart, 164 .restart = omap3xxx_restart,
165MACHINE_END 165MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index d0374ea2dfb0..f7c4616cbb60 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -123,6 +123,6 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
123 .handle_irq = omap3_intc_handle_irq, 123 .handle_irq = omap3_intc_handle_irq,
124 .init_machine = rx51_init, 124 .init_machine = rx51_init,
125 .init_late = omap3430_init_late, 125 .init_late = omap3430_init_late,
126 .timer = &omap3_timer, 126 .init_time = omap3_sync32k_timer_init,
127 .restart = omap3xxx_restart, 127 .restart = omap3xxx_restart,
128MACHINE_END 128MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index 1a3e056d63a7..6273c286e1d8 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -43,7 +43,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
43 .map_io = ti81xx_map_io, 43 .map_io = ti81xx_map_io,
44 .init_early = ti81xx_init_early, 44 .init_early = ti81xx_init_early,
45 .init_irq = ti81xx_init_irq, 45 .init_irq = ti81xx_init_irq,
46 .timer = &omap3_timer, 46 .init_time = omap3_sync32k_timer_init,
47 .init_machine = ti81xx_evm_init, 47 .init_machine = ti81xx_evm_init,
48 .init_late = ti81xx_init_late, 48 .init_late = ti81xx_init_late,
49 .restart = omap44xx_restart, 49 .restart = omap44xx_restart,
@@ -55,7 +55,7 @@ MACHINE_START(TI8148EVM, "ti8148evm")
55 .map_io = ti81xx_map_io, 55 .map_io = ti81xx_map_io,
56 .init_early = ti81xx_init_early, 56 .init_early = ti81xx_init_early,
57 .init_irq = ti81xx_init_irq, 57 .init_irq = ti81xx_init_irq,
58 .timer = &omap3_timer, 58 .init_time = omap3_sync32k_timer_init,
59 .init_machine = ti81xx_evm_init, 59 .init_machine = ti81xx_evm_init,
60 .init_late = ti81xx_init_late, 60 .init_late = ti81xx_init_late,
61 .restart = omap44xx_restart, 61 .restart = omap44xx_restart,
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index d7fa31e67238..d257cf1e0abe 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -137,7 +137,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
137 .handle_irq = omap3_intc_handle_irq, 137 .handle_irq = omap3_intc_handle_irq,
138 .init_machine = omap_zoom_init, 138 .init_machine = omap_zoom_init,
139 .init_late = omap3430_init_late, 139 .init_late = omap3430_init_late,
140 .timer = &omap3_timer, 140 .init_time = omap3_sync32k_timer_init,
141 .restart = omap3xxx_restart, 141 .restart = omap3xxx_restart,
142MACHINE_END 142MACHINE_END
143 143
@@ -150,6 +150,6 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
150 .handle_irq = omap3_intc_handle_irq, 150 .handle_irq = omap3_intc_handle_irq,
151 .init_machine = omap_zoom_init, 151 .init_machine = omap_zoom_init,
152 .init_late = omap3630_init_late, 152 .init_late = omap3630_init_late,
153 .timer = &omap3_timer, 153 .init_time = omap3_sync32k_timer_init,
154 .restart = omap3xxx_restart, 154 .restart = omap3xxx_restart,
155MACHINE_END 155MACHINE_END
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 948bcaa82eb6..b4350274361b 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -79,13 +79,13 @@ static inline int omap_mux_late_init(void)
79 79
80extern void omap2_init_common_infrastructure(void); 80extern void omap2_init_common_infrastructure(void);
81 81
82extern struct sys_timer omap2_timer; 82extern void omap2_sync32k_timer_init(void);
83extern struct sys_timer omap3_timer; 83extern void omap3_sync32k_timer_init(void);
84extern struct sys_timer omap3_secure_timer; 84extern void omap3_secure_sync32k_timer_init(void);
85extern struct sys_timer omap3_gp_timer; 85extern void omap3_gp_gptimer_timer_init(void);
86extern struct sys_timer omap3_am33xx_timer; 86extern void omap3_am33xx_gptimer_timer_init(void);
87extern struct sys_timer omap4_timer; 87extern void omap4_local_timer_init(void);
88extern struct sys_timer omap5_timer; 88extern void omap5_realtime_timer_init(void);
89 89
90void omap2420_init_early(void); 90void omap2420_init_early(void);
91void omap2430_init_early(void); 91void omap2430_init_early(void);
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 691aa674665a..5975a42e16d4 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -556,7 +556,7 @@ static inline void __init realtime_counter_init(void)
556 556
557#define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ 557#define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \
558 clksrc_nr, clksrc_src) \ 558 clksrc_nr, clksrc_src) \
559static void __init omap##name##_gptimer_timer_init(void) \ 559void __init omap##name##_gptimer_timer_init(void) \
560{ \ 560{ \
561 omap_dmtimer_init(); \ 561 omap_dmtimer_init(); \
562 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 562 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
@@ -565,7 +565,7 @@ static void __init omap##name##_gptimer_timer_init(void) \
565 565
566#define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ 566#define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \
567 clksrc_nr, clksrc_src) \ 567 clksrc_nr, clksrc_src) \
568static void __init omap##name##_sync32k_timer_init(void) \ 568void __init omap##name##_sync32k_timer_init(void) \
569{ \ 569{ \
570 omap_dmtimer_init(); \ 570 omap_dmtimer_init(); \
571 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 571 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
@@ -576,33 +576,23 @@ static void __init omap##name##_sync32k_timer_init(void) \
576 omap2_sync32k_clocksource_init(); \ 576 omap2_sync32k_clocksource_init(); \
577} 577}
578 578
579#define OMAP_SYS_TIMER(name, clksrc) \
580struct sys_timer omap##name##_timer = { \
581 .init = omap##name##_##clksrc##_timer_init, \
582};
583
584#ifdef CONFIG_ARCH_OMAP2 579#ifdef CONFIG_ARCH_OMAP2
585OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon", 580OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon",
586 2, OMAP2_MPU_SOURCE); 581 2, OMAP2_MPU_SOURCE);
587OMAP_SYS_TIMER(2, sync32k);
588#endif /* CONFIG_ARCH_OMAP2 */ 582#endif /* CONFIG_ARCH_OMAP2 */
589 583
590#ifdef CONFIG_ARCH_OMAP3 584#ifdef CONFIG_ARCH_OMAP3
591OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon", 585OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon",
592 2, OMAP3_MPU_SOURCE); 586 2, OMAP3_MPU_SOURCE);
593OMAP_SYS_TIMER(3, sync32k);
594OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure", 587OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure",
595 2, OMAP3_MPU_SOURCE); 588 2, OMAP3_MPU_SOURCE);
596OMAP_SYS_TIMER(3_secure, sync32k);
597OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon", 589OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon",
598 2, OMAP3_MPU_SOURCE); 590 2, OMAP3_MPU_SOURCE);
599OMAP_SYS_TIMER(3_gp, gptimer);
600#endif /* CONFIG_ARCH_OMAP3 */ 591#endif /* CONFIG_ARCH_OMAP3 */
601 592
602#ifdef CONFIG_SOC_AM33XX 593#ifdef CONFIG_SOC_AM33XX
603OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", 594OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon",
604 2, OMAP4_MPU_SOURCE); 595 2, OMAP4_MPU_SOURCE);
605OMAP_SYS_TIMER(3_am33xx, gptimer);
606#endif /* CONFIG_SOC_AM33XX */ 596#endif /* CONFIG_SOC_AM33XX */
607 597
608#ifdef CONFIG_ARCH_OMAP4 598#ifdef CONFIG_ARCH_OMAP4
@@ -610,7 +600,7 @@ OMAP_SYS_32K_TIMER_INIT(4, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
610 2, OMAP4_MPU_SOURCE); 600 2, OMAP4_MPU_SOURCE);
611#ifdef CONFIG_LOCAL_TIMERS 601#ifdef CONFIG_LOCAL_TIMERS
612static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); 602static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
613static void __init omap4_local_timer_init(void) 603void __init omap4_local_timer_init(void)
614{ 604{
615 omap4_sync32k_timer_init(); 605 omap4_sync32k_timer_init();
616 /* Local timers are not supprted on OMAP4430 ES1.0 */ 606 /* Local timers are not supprted on OMAP4430 ES1.0 */
@@ -628,18 +618,17 @@ static void __init omap4_local_timer_init(void)
628 } 618 }
629} 619}
630#else /* CONFIG_LOCAL_TIMERS */ 620#else /* CONFIG_LOCAL_TIMERS */
631static void __init omap4_local_timer_init(void) 621void __init omap4_local_timer_init(void)
632{ 622{
633 omap4_sync32k_timer_init(); 623 omap4_sync32k_timer_init();
634} 624}
635#endif /* CONFIG_LOCAL_TIMERS */ 625#endif /* CONFIG_LOCAL_TIMERS */
636OMAP_SYS_TIMER(4, local);
637#endif /* CONFIG_ARCH_OMAP4 */ 626#endif /* CONFIG_ARCH_OMAP4 */
638 627
639#ifdef CONFIG_SOC_OMAP5 628#ifdef CONFIG_SOC_OMAP5
640OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", 629OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
641 2, OMAP4_MPU_SOURCE); 630 2, OMAP4_MPU_SOURCE);
642static void __init omap5_realtime_timer_init(void) 631void __init omap5_realtime_timer_init(void)
643{ 632{
644 int err; 633 int err;
645 634
@@ -650,7 +639,6 @@ static void __init omap5_realtime_timer_init(void)
650 if (err) 639 if (err)
651 pr_err("%s: arch_timer_register failed %d\n", __func__, err); 640 pr_err("%s: arch_timer_register failed %d\n", __func__, err);
652} 641}
653OMAP_SYS_TIMER(5, realtime);
654#endif /* CONFIG_SOC_OMAP5 */ 642#endif /* CONFIG_SOC_OMAP5 */
655 643
656/** 644/**