omap: Set separate timer init functions to avoid cpu_is_omap tests
authorTony Lindgren <tony@atomide.com>
Tue, 29 Mar 2011 22:54:48 +0000 (15:54 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 20 Jun 2011 08:25:39 +0000 (01:25 -0700)
This is needed for the following patches so we can initialize the
rest of the hardware timers later on.

As with the init_irq calls, there's no need to do cpu_is_omap calls
during the timer init as we only care about the major omap generation.
This means that we can initialize the sys_timer with the .timer
entries alone.

Note that for now we just set stubs for the various sys_timer entries
that will get populated in a later patch. The following patches will
also remove the omap_dm_timer_init calls and change the init for the
rest of the hardware timers to happen with an arch_initcall.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
46 files changed:
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-generic.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/time.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-3630sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517crane.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-n8x0.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-ti8168evm.c
arch/arm/mach-omap2/board-zoom.c
arch/arm/mach-omap2/timer-gp.c
arch/arm/plat-omap/include/plat/common.h
arch/arm/plat-omap/include/plat/dmtimer.h

index 17ed7575e03578b1c26c2f0520440cd1b746ecfc..f1ac7fbf54a9ae01147309e2abb9359257149611 100644 (file)
@@ -391,7 +391,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
        .reserve        = omap_reserve,
        .init_irq       = ams_delta_init_irq,
        .init_machine   = ams_delta_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
 
 EXPORT_SYMBOL(ams_delta_latch1_write);
index eaff305fa47da057e284cba67d791b47de536bee..a6b1bea50371e7144492af17f4d9163116d1ac0d 100644 (file)
@@ -394,5 +394,5 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
        .reserve        = omap_reserve,
        .init_irq       = omap_fsample_init_irq,
        .init_machine   = omap_fsample_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 3fd6b40d2e92bf7381512677ec612a4a84aa4ca6..04fc356c40fa9c0fd8ea8f7c69b4afa64852716e 100644 (file)
@@ -99,5 +99,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
        .reserve        = omap_reserve,
        .init_irq       = omap_generic_init_irq,
        .init_machine   = omap_generic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 8147b044de5671ff4790a2c3ade2724c8fee6f3e..cb7fb1aa3dca5e832374971add929ec1fdd49845 100644 (file)
@@ -466,5 +466,5 @@ MACHINE_START(OMAP_H2, "TI-H2")
        .reserve        = omap_reserve,
        .init_irq       = h2_init_irq,
        .init_machine   = h2_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 1b448f6419184d6f10764d5e4c58277edce12ab4..31f34875ffad370fc1da66e3d930731687185200 100644 (file)
@@ -454,5 +454,5 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
        .reserve        = omap_reserve,
        .init_irq       = h3_init_irq,
        .init_machine   = h3_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 1bd4d8e2580c4d52a2036758d28c9ac39ba37886..36e06ea7ec65c728e927cbdf27f07085c67d40fc 100644 (file)
@@ -616,5 +616,5 @@ MACHINE_START(HERALD, "HTC Herald")
        .reserve        = omap_reserve,
        .init_irq       = htcherald_init_irq,
        .init_machine   = htcherald_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 5926b0cf046767284d31c51df4e923bbdadb855f..0b1ba462d3885824561ebb3ea0b6047b6f0efe35 100644 (file)
@@ -464,5 +464,5 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
        .reserve        = omap_reserve,
        .init_irq       = innovator_init_irq,
        .init_machine   = innovator_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index e3cf21d3c301af6217dcf6c05a9fe4772b36267c..5469ce247ffe913a31e7a61d82a4a94aafc59362 100644 (file)
@@ -269,5 +269,5 @@ MACHINE_START(NOKIA770, "Nokia 770")
        .reserve        = omap_reserve,
        .init_irq       = omap_nokia770_init_irq,
        .init_machine   = omap_nokia770_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 1e7823d9df37a3129e8c774158391b9f29be6d80..b08a213807724d6027eb304fe3296a32cfdb31a1 100644 (file)
@@ -588,5 +588,5 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
        .reserve        = omap_reserve,
        .init_irq       = osk_init_irq,
        .init_machine   = osk_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 8b6a881841353e3344fa03f1bca8af080110c189..459cb6bfed55aa36e3e2dd8a6cdccf53ee355fb7 100644 (file)
@@ -280,5 +280,5 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
        .reserve        = omap_reserve,
        .init_irq       = omap_palmte_init_irq,
        .init_machine   = omap_palmte_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index f2de43d8336fae0ccec0f76954a50d1045451100..b214f45f646c558dcf18b65c0483dafed2940df6 100644 (file)
@@ -326,5 +326,5 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
        .reserve        = omap_reserve,
        .init_irq       = omap_palmtt_init_irq,
        .init_machine   = omap_palmtt_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 6665d2da874b24434309af0750b2baf45009ca6e..9b0ea48d35fd873b2c981e78466de4195319281a 100644 (file)
@@ -346,5 +346,5 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
        .reserve        = omap_reserve,
        .init_irq       = omap_palmz71_init_irq,
        .init_machine   = omap_palmz71_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 7f019e55a14941da8c84ae38b82dd16abff6aed1..67acd4142639a56a88cbe6a9601b45a06652b099 100644 (file)
@@ -355,5 +355,5 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
        .reserve        = omap_reserve,
        .init_irq       = omap_perseus2_init_irq,
        .init_machine   = omap_perseus2_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 24f0f7b8556747663aaffdd0c128ed21cc13ab12..9c3b7c52d9cf60b4ed0b1ec45b62eaba08f8c668 100644 (file)
@@ -426,5 +426,5 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
        .reserve        = omap_reserve,
        .init_irq       = omap_sx1_init_irq,
        .init_machine   = omap_sx1_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 98826e2ae8cae0a8a963f9c0a21142ebd54f87fd..036edc0ee9b6e8d41f74f0eb16023f9caafeee8d 100644 (file)
@@ -306,5 +306,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
        .reserve        = omap_reserve,
        .init_irq       = voiceblue_init_irq,
        .init_machine   = voiceblue_init,
-       .timer          = &omap_timer,
+       .timer          = &omap1_timer,
 MACHINE_END
index 03e1e1062ad4d782419ce3dd3d3489fad9eb55cd..a1837771e031bdd3836e054bf549f85af21a1640 100644 (file)
@@ -297,7 +297,7 @@ static inline int omap_32k_timer_usable(void)
  * Timer initialization
  * ---------------------------------------------------------------------------
  */
-static void __init omap_timer_init(void)
+static void __init omap1_timer_init(void)
 {
        if (omap_32k_timer_usable()) {
                preferred_sched_clock_init(1);
@@ -307,6 +307,6 @@ static void __init omap_timer_init(void)
        }
 }
 
-struct sys_timer omap_timer = {
-       .init           = omap_timer_init,
+struct sys_timer omap1_timer = {
+       .init           = omap1_timer_init,
 };
index 45cabc5283e496ea32d62ff12dc715a0182a2613..2028464cf5b90596392a18eabe16a402929554ca 100644 (file)
@@ -262,5 +262,5 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
        .init_early     = omap_2430sdp_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = omap_2430sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 85b207f03865de786c516b6278784a8754cb8d71..12fae21346cf09a09de20507accc87dce50a10cc 100644 (file)
@@ -806,5 +806,5 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
        .init_early     = omap_3430sdp_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_3430sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 2ec2d76087da3dd3ed881901d75ee8cdd086cf7a..e4f37b57a0c4686f836b7ca1c8465b9739c896e2 100644 (file)
@@ -221,5 +221,5 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
        .init_early     = omap_sdp_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 63de2d396e2dddf84eaec2b6035aad64aba49385..128efb50215cae0ad242a8eee6859891315b8655 100644 (file)
@@ -773,5 +773,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
        .init_early     = omap_4430sdp_init_early,
        .init_irq       = gic_init_irq,
        .init_machine   = omap_4430sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap4_timer,
 MACHINE_END
index 0bed0a4c8338db69f0aeb6744b2eb5b122123e9c..5f2b55ff04ff5975dc56bdf991e0a560782b63a7 100644 (file)
@@ -106,5 +106,5 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
        .init_early     = am3517_crane_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = am3517_crane_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 0db0fb843010c6e7c2ed323c2a023a69936323ad..f3006c304150446c6fdedafabae77bf0c8381e89 100644 (file)
@@ -496,5 +496,5 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
        .init_early     = am3517_evm_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = am3517_evm_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 93576c8a7157e9f00013b16f984824b46429d321..70211703ff9f3b7a0334930737d56f6b5b39acfa 100644 (file)
@@ -356,5 +356,5 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
        .init_early     = omap_apollon_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = omap_apollon_init,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 2940d640a66198619ced9249aa7ff189229e1e6c..8b49dc2c7b9d821c11770ba3b2e84a5515a4442d 100644 (file)
@@ -648,5 +648,5 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
        .init_early     = cm_t35_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = cm_t35_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 8f152228977c7178c52726029670a053f83f9f67..aa67240da8e8ee18def73b7e729fe973548c26ca 100644 (file)
@@ -306,5 +306,5 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
        .init_early     = cm_t3517_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = cm_t3517_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 00f6cb6e3bf9df35afaf7bbbb1129f1b254ef51f..671aaeade1164e7ce9446044d1e756ed1d82bb61 100644 (file)
@@ -707,5 +707,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
        .init_early     = devkit8000_init_early,
        .init_irq       = devkit8000_init_irq,
        .init_machine   = devkit8000_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_secure_timer,
 MACHINE_END
index ccd503ac24bd243f74be2b10b366eff0ee1e59bf..c6ecf607ebd666390d3172c5998c23d24b0fd93b 100644 (file)
@@ -72,5 +72,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
        .init_early     = omap_generic_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = omap_generic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 2e16d6cb3fe131031cb28f56506f71d017d12ee6..45de2b319ec9b631d968c5c5fe8454f640121da8 100644 (file)
@@ -388,5 +388,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
        .init_early     = omap_h4_init_early,
        .init_irq       = omap_h4_init_irq,
        .init_machine   = omap_h4_init,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 359b765483f5d3295c385481c0be24055da98f58..381a27c615b7e2b93a37fa1a297968e3aefead1a 100644 (file)
@@ -705,7 +705,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
        .init_early     = igep_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
 
 MACHINE_START(IGEP0030, "IGEP OMAP3 module")
@@ -715,5 +715,5 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
        .init_early     = igep_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index a054f54b1714b744b3a34e09a59beaef2e35fd4d..75ebc99f9d53a1d9872f4f2ff145fc6f2a603e84 100644 (file)
@@ -352,5 +352,5 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
        .init_early     = omap_ldp_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_ldp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 9c791a291898df391fd927ccc15942e09c3ae84e..e11f0c5d608ac6f58aba83d7f57fc3954456efc2 100644 (file)
@@ -701,7 +701,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
        .init_early     = n8x0_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
 
 MACHINE_START(NOKIA_N810, "Nokia N810")
@@ -711,7 +711,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
        .init_early     = n8x0_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
 
 MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
@@ -721,5 +721,5 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
        .init_early     = n8x0_init_early,
        .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
-       .timer          = &omap_timer,
+       .timer          = &omap2_timer,
 MACHINE_END
index 4560055487188783638f1c62d9204bde847a4768..3d416549936a63a4b309c7fad2bbe4e5d6ea59b5 100644 (file)
@@ -599,5 +599,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
        .init_early     = omap3_beagle_init_early,
        .init_irq       = omap3_beagle_init_irq,
        .init_machine   = omap3_beagle_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_secure_timer,
 MACHINE_END
index 79d5362cb2605edc466033f0f4779452287de5e3..7cbcf60436261ad2ff2d3e242949fb39eb614a6a 100644 (file)
@@ -742,5 +742,5 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
        .init_early     = omap3_evm_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3_evm_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 739fdfc123389f7827b9f1c928a372d291d00fa4..693eba1d4f7d726ac8a1b0137e153dbd5a73a6dc 100644 (file)
@@ -217,7 +217,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
        .init_early     = omap3logic_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
 
 MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
@@ -226,5 +226,5 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
        .init_early     = omap3logic_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 7b4e1391ee8051cc0cc1992b05bbe8f8da742bbe..ff0be8320793fa64133318686c4355f59eac11ff 100644 (file)
@@ -644,5 +644,5 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
        .init_early     = omap3pandora_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap3pandora_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 01616260224b441a3acafce52525f07089d6df15..96fec1f8fca1e7805cd5a73243adf5ea42c2fc74 100644 (file)
@@ -560,5 +560,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
        .init_early             = omap3_stalker_init_early,
        .init_irq               = omap3_stalker_init_irq,
        .init_machine           = omap3_stalker_init,
-       .timer                  = &omap_timer,
+       .timer                  = &omap3_secure_timer,
 MACHINE_END
index 3cc553159557b08b5a9ca4d07cfbd127283d54b4..9447bc06d0d0dd7bf995e8581fc1710e94ee637f 100644 (file)
@@ -449,5 +449,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
        .init_early     = omap3_touchbook_init_early,
        .init_irq       = omap3_touchbook_init_irq,
        .init_machine   = omap3_touchbook_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_secure_timer,
 MACHINE_END
index 0cfe2005cb506a32c79d96f9864bb7e24bd35a0f..e76fe98a0bbed70e75d730d248f8c98c02103f66 100644 (file)
@@ -716,5 +716,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
        .init_early     = omap4_panda_init_early,
        .init_irq       = gic_init_irq,
        .init_machine   = omap4_panda_init,
-       .timer          = &omap_timer,
+       .timer          = &omap4_timer,
 MACHINE_END
index 9c9f20cd9ce1abd12ee3cb1595535ee3007a05ad..d06248f0b802d38302c876e019e097cf5f8fe354 100644 (file)
@@ -617,5 +617,5 @@ MACHINE_START(OVERO, "Gumstix Overo")
        .init_early     = overo_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = overo_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 9c3d115b65d134e248c37964f6528b27278b5a00..54dceb163415d05fb19e2b9ebb7bcb23fcae62a4 100644 (file)
@@ -165,5 +165,5 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
        .init_early     = rm680_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = rm680_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index ee35e4e8b09d5fad21d0c7e68d01cbd36fcf9ede..5ea142f9bc9741368928ca83e09b3573947c7021 100644 (file)
@@ -162,5 +162,5 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
        .init_early     = rx51_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = rx51_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 713c20f20f3e74be225cfada4222b955cf5bea16..a85d5b0b11da23cfafc831d3c53e64a2e7ac93ed 100644 (file)
@@ -52,6 +52,6 @@ MACHINE_START(TI8168EVM, "ti8168evm")
        .map_io         = ti8168_evm_map_io,
        .init_early     = ti8168_init_early,
        .init_irq       = ti816x_init_irq,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
        .init_machine   = ti8168_evm_init,
 MACHINE_END
index 97a3f0b21c33d0c9ae65d92a9ad212f7104256d4..8a98c3c303fc6a46fa9d0a26efa36cec9da6cf88 100644 (file)
@@ -139,7 +139,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
        .init_early     = omap_zoom_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
 
 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
@@ -149,5 +149,5 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
        .init_early     = omap_zoom_init_early,
        .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
-       .timer          = &omap_timer,
+       .timer          = &omap3_timer,
 MACHINE_END
index 3b9cf85f4bb94c9c2eee0afdfa0584d853b22be9..a0d8e83594ebfc262925a6ed754f462120c2a599 100644 (file)
@@ -247,20 +247,41 @@ static void __init omap2_gp_clocksource_init(void)
 }
 #endif
 
-static void __init omap2_gp_timer_init(void)
+#define OMAP_SYS_TIMER_INIT(name)                                      \
+static void __init omap##name##_timer_init(void)                       \
+{                                                                      \
+       omap_dm_timer_init();                                           \
+       omap2_gp_clockevent_init();                                     \
+       omap2_gp_clocksource_init();                                    \
+}
+
+#define OMAP_SYS_TIMER(name)                                           \
+struct sys_timer omap##name##_timer = {                                        \
+       .init   = omap##name##_timer_init,                              \
+};
+
+#ifdef CONFIG_ARCH_OMAP2
+OMAP_SYS_TIMER_INIT(2)
+OMAP_SYS_TIMER(2)
+#endif
+
+#ifdef CONFIG_ARCH_OMAP3
+OMAP_SYS_TIMER_INIT(3)
+OMAP_SYS_TIMER(3)
+OMAP_SYS_TIMER_INIT(3_secure)
+OMAP_SYS_TIMER(3_secure)
+#endif
+
+#ifdef CONFIG_ARCH_OMAP4
+static void __init omap4_timer_init(void)
 {
 #ifdef CONFIG_LOCAL_TIMERS
-       if (cpu_is_omap44xx()) {
-               twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
-               BUG_ON(!twd_base);
-       }
+       twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
+       BUG_ON(!twd_base);
 #endif
        omap_dm_timer_init();
-
        omap2_gp_clockevent_init();
        omap2_gp_clocksource_init();
 }
-
-struct sys_timer omap_timer = {
-       .init   = omap2_gp_timer_init,
-};
+OMAP_SYS_TIMER(4)
+#endif
index 5288130be96e9b4cb95ff6b14ce6b8ad171e5558..4564cc697d7ff867726ec7ccb636a958d0bd9794 100644 (file)
 struct sys_timer;
 
 extern void omap_map_common_io(void);
-extern struct sys_timer omap_timer;
+extern struct sys_timer omap1_timer;
+extern struct sys_timer omap2_timer;
+extern struct sys_timer omap3_timer;
+extern struct sys_timer omap3_secure_timer;
+extern struct sys_timer omap4_timer;
 extern bool omap_32k_timer_init(void);
 extern int __init omap_init_clocksource_32k(void);
 extern unsigned long long notrace omap_32k_sched_clock(void);
index d6c70d2f4030d99fdd543dc10be5aeaeb5992e29..330bd17bb5e7a64887192ebb0c28098b322978ae 100644 (file)
@@ -57,7 +57,6 @@
 #define OMAP_TIMER_IP_VERSION_1                        0x1
 struct omap_dm_timer;
 extern struct omap_dm_timer *gptimer_wakeup;
-extern struct sys_timer omap_timer;
 struct clk;
 
 int omap_dm_timer_init(void);