omap: Use separate init_irq functions to avoid cpu_is_omap tests early
authorTony Lindgren <tony@atomide.com>
Tue, 17 May 2011 10:51:26 +0000 (03:51 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 16 Jun 2011 12:42:09 +0000 (05:42 -0700)
This allows us to remove cpu_is_omap calls from init_irq functions.
There should not be any need for cpu_is_omap calls as at this point.
During the timer init we only care about SoC generation, and not about
subrevisions.

The main reason for the patch is that we want to initialize only
minimal omap specific code from the init_early call.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
45 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/irq.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-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-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/io.c
arch/arm/mach-omap2/irq.c
arch/arm/mach-omap2/omap4-common.c
arch/arm/plat-omap/include/plat/irqs.h

index de88c9297b68bc4f014076bf444196549d7893ef..17ed7575e03578b1c26c2f0520440cd1b746ecfc 100644 (file)
@@ -138,7 +138,7 @@ void ams_delta_latch2_write(u16 mask, u16 value)
 static void __init ams_delta_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct map_desc ams_delta_io_desc[] __initdata = {
index 87f173d935578752cf60ec112800dbb1dd1d5e78..eaff305fa47da057e284cba67d791b47de536bee 100644 (file)
@@ -329,7 +329,7 @@ static void __init omap_fsample_init(void)
 static void __init omap_fsample_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
index 23f4ab9e265128bcc9ee0846b56789e2beadade4..3fd6b40d2e92bf7381512677ec612a4a84aa4ca6 100644 (file)
@@ -31,7 +31,7 @@
 static void __init omap_generic_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 /* assume no Mini-AB port */
index ba3bd09c4754562add074e2dec4864ce4acd8e14..8147b044de5671ff4790a2c3ade2724c8fee6f3e 100644 (file)
@@ -376,7 +376,7 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = {
 static void __init h2_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct omap_usb_config h2_usb_config __initdata = {
index ac48677672ee6bcc990ce25487a373e4e4928850..1b448f6419184d6f10764d5e4c58277edce12ab4 100644 (file)
@@ -439,7 +439,7 @@ static void __init h3_init(void)
 static void __init h3_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static void __init h3_map_io(void)
index ba05a51f9408dfe308f66e0cb36a717c3101a745..1bd4d8e2580c4d52a2036758d28c9ac39ba37886 100644 (file)
@@ -605,7 +605,7 @@ static void __init htcherald_init_irq(void)
 {
        printk(KERN_INFO "htcherald_init_irq.\n");
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 MACHINE_START(HERALD, "HTC Herald")
index 2d9b8cbd7a142ddfc9bc12e69522ec2ed727ad8b..5926b0cf046767284d31c51df4e923bbdadb855f 100644 (file)
@@ -292,7 +292,7 @@ static void __init innovator_init_smc91x(void)
 static void __init innovator_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 #ifdef CONFIG_ARCH_OMAP15XX
index cfd0849261468edda8039cb127c1b21538e2d5eb..e3cf21d3c301af6217dcf6c05a9fe4772b36267c 100644 (file)
@@ -51,7 +51,7 @@ static void __init omap_nokia770_init_irq(void)
        omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
 
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static const unsigned int nokia770_keymap[] = {
index e68dfde1918e7dd437808e49c8e7fcf93089586c..1e7823d9df37a3129e8c774158391b9f29be6d80 100644 (file)
@@ -282,7 +282,7 @@ static void __init osk_init_cf(void)
 static void __init osk_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct omap_usb_config osk_usb_config __initdata = {
index c9d38f47845f1801e89d08f691ddff670bc333be..8b6a881841353e3344fa03f1bca8af080110c189 100644 (file)
@@ -62,7 +62,7 @@
 static void __init omap_palmte_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static const unsigned int palmte_keymap[] = {
index f04f2d36e7d3471d8425d2c9f0c7463a0dfeb044..f2de43d8336fae0ccec0f76954a50d1045451100 100644 (file)
@@ -266,7 +266,7 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = {
 static void __init omap_palmtt_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static struct omap_usb_config palmtt_usb_config __initdata = {
index 45f01d2c3a7a0c812c06d134cbd829f2277f11d6..6665d2da874b24434309af0750b2baf45009ca6e 100644 (file)
@@ -61,7 +61,7 @@ static void __init
 omap_palmz71_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static const unsigned int palmz71_keymap[] = {
index 3c8ee8489458fc3456697e402b3fffa33aa8aba2..7f019e55a14941da8c84ae38b82dd16abff6aed1 100644 (file)
@@ -297,7 +297,7 @@ static void __init omap_perseus2_init(void)
 static void __init omap_perseus2_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
 static struct map_desc omap_perseus2_io_desc[] __initdata = {
index 0ad781db4e66d0bb0a2581323e6ec761ca0b6db8..24f0f7b8556747663aaffdd0c128ed21cc13ab12 100644 (file)
@@ -411,7 +411,7 @@ static void __init omap_sx1_init(void)
 static void __init omap_sx1_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 /*----------------------------------------*/
 
index 65d24204937a9da268fb333bfda122448cc050ad..98826e2ae8cae0a8a963f9c0a21142ebd54f87fd 100644 (file)
@@ -162,7 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = {
 static void __init voiceblue_init_irq(void)
 {
        omap1_init_common_hw();
-       omap_init_irq();
+       omap1_init_irq();
 }
 
 static void __init voiceblue_map_io(void)
index 5d3da7a63af308496fc11dde8e15b5a2dd152e42..e2b9c901ab67c4d07a274e34def39bb5ace47644 100644 (file)
@@ -175,7 +175,7 @@ static struct irq_chip omap_irq_chip = {
        .irq_set_wake   = omap_wake_irq,
 };
 
-void __init omap_init_irq(void)
+void __init omap1_init_irq(void)
 {
        int i, j;
 
index 5de6eac0a72520a8b37e7a9d5cde73c3de40b1c5..45cabc5283e496ea32d62ff12dc715a0182a2613 100644 (file)
@@ -260,7 +260,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
        .reserve        = omap_reserve,
        .map_io         = omap_2430sdp_map_io,
        .init_early     = omap_2430sdp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = omap_2430sdp_init,
        .timer          = &omap_timer,
 MACHINE_END
index 5dac974be6256bd4a22a4fc570142d56bee90efa..85b207f03865de786c516b6278784a8754cb8d71 100644 (file)
@@ -804,7 +804,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_3430sdp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_3430sdp_init,
        .timer          = &omap_timer,
 MACHINE_END
index a5933cc15caaff8fd6e0f90e4e3853fcf93a3e25..2ec2d76087da3dd3ed881901d75ee8cdd086cf7a 100644 (file)
@@ -219,7 +219,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_sdp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_sdp_init,
        .timer          = &omap_timer,
 MACHINE_END
index 5e438a77cd726f35e5df2ea43df0788f8e34d16b..0bed0a4c8338db69f0aeb6744b2eb5b122123e9c 100644 (file)
@@ -104,7 +104,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = am3517_crane_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = am3517_crane_init,
        .timer          = &omap_timer,
 MACHINE_END
index 63af4171c0436d85c3d7ea35d6a21679380414fa..0db0fb843010c6e7c2ed323c2a023a69936323ad 100644 (file)
@@ -494,7 +494,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = am3517_evm_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = am3517_evm_init,
        .timer          = &omap_timer,
 MACHINE_END
index b124bdfb4239ebfcf42c8ca5ab011322cdec3182..93576c8a7157e9f00013b16f984824b46429d321 100644 (file)
@@ -354,7 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
        .reserve        = omap_reserve,
        .map_io         = omap_apollon_map_io,
        .init_early     = omap_apollon_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = omap_apollon_init,
        .timer          = &omap_timer,
 MACHINE_END
index 77456dec93ea9640c60a7b48f7dcf3db4b68e568..2940d640a66198619ced9249aa7ff189229e1e6c 100644 (file)
@@ -646,7 +646,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = cm_t35_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = cm_t35_init,
        .timer          = &omap_timer,
 MACHINE_END
index c3a9fd35034a3b40ad33df50e2573c7f5a000cbb..8f152228977c7178c52726029670a053f83f9f67 100644 (file)
@@ -304,7 +304,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = cm_t3517_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = cm_t3517_init,
        .timer          = &omap_timer,
 MACHINE_END
index 34956ec832960f1e215241f196ef2d89b3006d91..00f6cb6e3bf9df35afaf7bbbb1129f1b254ef51f 100644 (file)
@@ -438,7 +438,7 @@ static void __init devkit8000_init_early(void)
 
 static void __init devkit8000_init_irq(void)
 {
-       omap_init_irq();
+       omap3_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
 #endif
index 73e3c31e85080bf619862c04aae235fe35ec2618..ccd503ac24bd243f74be2b10b366eff0ee1e59bf 100644 (file)
@@ -70,7 +70,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
        .reserve        = omap_reserve,
        .map_io         = omap_generic_map_io,
        .init_early     = omap_generic_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = omap_generic_init,
        .timer          = &omap_timer,
 MACHINE_END
index bac7933b8cbb79cc644a4d4b388cbac52f2da439..2e16d6cb3fe131031cb28f56506f71d017d12ee6 100644 (file)
@@ -298,7 +298,7 @@ static void __init omap_h4_init_early(void)
 
 static void __init omap_h4_init_irq(void)
 {
-       omap_init_irq();
+       omap2_init_irq();
 }
 
 static struct at24_platform_data m24c01 = {
index 0c1bfca3f731cfdd4b8a9fa7aaa0793cca01e18b..359b765483f5d3295c385481c0be24055da98f58 100644 (file)
@@ -703,7 +703,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = igep_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
        .timer          = &omap_timer,
 MACHINE_END
@@ -713,7 +713,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = igep_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = igep_init,
        .timer          = &omap_timer,
 MACHINE_END
index f7d6038075f0721be241eff8a6b08859c1a86daa..a054f54b1714b744b3a34e09a59beaef2e35fd4d 100644 (file)
@@ -350,7 +350,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_ldp_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_ldp_init,
        .timer          = &omap_timer,
 MACHINE_END
index 8d74318ed495efcf2522c30e00035463cb0abb67..9c791a291898df391fd927ccc15942e09c3ae84e 100644 (file)
@@ -699,7 +699,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
        .reserve        = omap_reserve,
        .map_io         = n8x0_map_io,
        .init_early     = n8x0_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap_timer,
 MACHINE_END
@@ -709,7 +709,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
        .reserve        = omap_reserve,
        .map_io         = n8x0_map_io,
        .init_early     = n8x0_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap_timer,
 MACHINE_END
@@ -719,7 +719,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
        .reserve        = omap_reserve,
        .map_io         = n8x0_map_io,
        .init_early     = n8x0_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap2_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap_timer,
 MACHINE_END
index 7f21d24bd437732724a45af9302c50a514f56482..4560055487188783638f1c62d9204bde847a4768 100644 (file)
@@ -486,7 +486,7 @@ static void __init omap3_beagle_init_early(void)
 
 static void __init omap3_beagle_init_irq(void)
 {
-       omap_init_irq();
+       omap3_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
 #endif
index b4d43464a303f43e5a6283c61dd09b55f657d624..79d5362cb2605edc466033f0f4779452287de5e3 100644 (file)
@@ -740,7 +740,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap3_evm_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3_evm_init,
        .timer          = &omap_timer,
 MACHINE_END
index 60d9be49dbab1a3595b12291a65abe36d6724bc4..739fdfc123389f7827b9f1c928a372d291d00fa4 100644 (file)
@@ -215,7 +215,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
        .boot_params    = 0x80000100,
        .map_io         = omap3_map_io,
        .init_early     = omap3logic_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
        .timer          = &omap_timer,
 MACHINE_END
@@ -224,7 +224,7 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
        .boot_params    = 0x80000100,
        .map_io         = omap3_map_io,
        .init_early     = omap3logic_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3logic_init,
        .timer          = &omap_timer,
 MACHINE_END
index 2a0bb4818caef6a99a99e068946f970f8adcee1e..7b4e1391ee8051cc0cc1992b05bbe8f8da742bbe 100644 (file)
@@ -642,7 +642,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap3pandora_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap3pandora_init,
        .timer          = &omap_timer,
 MACHINE_END
index 0c108a212ea2190904bb6e66ee11aad696f40c15..01616260224b441a3acafce52525f07089d6df15 100644 (file)
@@ -494,7 +494,7 @@ static void __init omap3_stalker_init_early(void)
 
 static void __init omap3_stalker_init_irq(void)
 {
-       omap_init_irq();
+       omap3_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
 #endif
index 5f649faf7377ecb757c49c73e9430d91adf2940f..3cc553159557b08b5a9ca4d07cfbd127283d54b4 100644 (file)
@@ -371,7 +371,7 @@ static void __init omap3_touchbook_init_early(void)
 
 static void __init omap3_touchbook_init_irq(void)
 {
-       omap_init_irq();
+       omap3_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
 #endif
index 175e1ab2b04d7225a0a13485e12e239e9692030d..9c9f20cd9ce1abd12ee3cb1595535ee3007a05ad 100644 (file)
@@ -615,7 +615,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = overo_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = overo_init,
        .timer          = &omap_timer,
 MACHINE_END
index 42d10b12da3ccedadacf35f05be4273b37214964..9c3d115b65d134e248c37964f6528b27278b5a00 100644 (file)
@@ -163,7 +163,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
        .reserve        = omap_reserve,
        .map_io         = rm680_map_io,
        .init_early     = rm680_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = rm680_init,
        .timer          = &omap_timer,
 MACHINE_END
index fec4cac8fa0ab858fd6c09f55af0b08ce8e0ad1a..ee35e4e8b09d5fad21d0c7e68d01cbd36fcf9ede 100644 (file)
@@ -160,7 +160,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
        .reserve        = rx51_reserve,
        .map_io         = rx51_map_io,
        .init_early     = rx51_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = rx51_init,
        .timer          = &omap_timer,
 MACHINE_END
index 09fa7bfff8d6b2a75a170caab975e1f08b29b93f..713c20f20f3e74be225cfada4222b955cf5bea16 100644 (file)
@@ -33,11 +33,6 @@ static void __init ti8168_init_early(void)
        omap2_init_common_devices(NULL, NULL);
 }
 
-static void __init ti8168_evm_init_irq(void)
-{
-       omap_init_irq();
-}
-
 static void __init ti8168_evm_init(void)
 {
        omap_serial_init();
@@ -56,7 +51,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
        .boot_params    = 0x80000100,
        .map_io         = ti8168_evm_map_io,
        .init_early     = ti8168_init_early,
-       .init_irq       = ti8168_evm_init_irq,
+       .init_irq       = ti816x_init_irq,
        .timer          = &omap_timer,
        .init_machine   = ti8168_evm_init,
 MACHINE_END
index 4b133d75c9354ae1da9e08615ba336e78830519d..97a3f0b21c33d0c9ae65d92a9ad212f7104256d4 100644 (file)
@@ -137,7 +137,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_zoom_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
        .timer          = &omap_timer,
 MACHINE_END
@@ -147,7 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap_zoom_init_early,
-       .init_irq       = omap_init_irq,
+       .init_irq       = omap3_init_irq,
        .init_machine   = omap_zoom_init,
        .timer          = &omap_timer,
 MACHINE_END
index 441e79d043a71245bde9b5e4256a88a8eabb2367..2ce1ce6fb4dbd7e1db81a48ad47f3c709e233c87 100644 (file)
@@ -333,23 +333,9 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
        return omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
 }
 
+/* See irq.c, omap4-common.c and entry-macro.S */
 void __iomem *omap_irq_base;
 
-/*
- * Initialize asm_irq_base for entry-macro.S
- */
-static inline void omap_irq_base_init(void)
-{
-       if (cpu_is_omap24xx())
-               omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE);
-       else if (cpu_is_omap34xx())
-               omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE);
-       else if (cpu_is_omap44xx())
-               omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE);
-       else
-               pr_err("Could not initialize omap_irq_base\n");
-}
-
 void __init omap2_init_common_infrastructure(void)
 {
        u8 postsetup_state;
@@ -422,7 +408,6 @@ void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
                _omap2_init_reprogram_sdrc();
        }
 
-       omap_irq_base_init();
 }
 
 /*
index 3af2b7a1045e38d957e40a1f125acb19bc57ba41..3a12f7586a4cfc1e258aee208390065b79b6051b 100644 (file)
@@ -141,25 +141,20 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
                                IRQ_NOREQUEST | IRQ_NOPROBE, 0);
 }
 
-void __init omap_init_irq(void)
+static void __init omap_init_irq(u32 base, int nr_irqs)
 {
        unsigned long nr_of_irqs = 0;
        unsigned int nr_banks = 0;
        int i, j;
 
+       omap_irq_base = ioremap(base, SZ_4K);
+       if (WARN_ON(!omap_irq_base))
+               return;
+
        for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
-               unsigned long base = 0;
                struct omap_irq_bank *bank = irq_banks + i;
 
-               if (cpu_is_omap24xx())
-                       base = OMAP24XX_IC_BASE;
-               else if (cpu_is_omap34xx())
-                       base = OMAP34XX_IC_BASE;
-
-               BUG_ON(!base);
-
-               if (cpu_is_ti816x())
-                       bank->nr_irqs = 128;
+               bank->nr_irqs = nr_irqs;
 
                /* Static mapping, never released */
                bank->base_reg = ioremap(base, SZ_4K);
@@ -181,6 +176,21 @@ void __init omap_init_irq(void)
               nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");
 }
 
+void __init omap2_init_irq(void)
+{
+       omap_init_irq(OMAP24XX_IC_BASE, 96);
+}
+
+void __init omap3_init_irq(void)
+{
+       omap_init_irq(OMAP34XX_IC_BASE, 96);
+}
+
+void __init ti816x_init_irq(void)
+{
+       omap_init_irq(OMAP34XX_IC_BASE, 128);
+}
+
 #ifdef CONFIG_ARCH_OMAP3
 static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
 
index 9ef8c29dd817091bb2b8c49ed2332ba2023dff6c..35ac3e5f6e94c4077e712cd8ae4333771eef3526 100644 (file)
@@ -19,6 +19,8 @@
 #include <asm/hardware/gic.h>
 #include <asm/hardware/cache-l2x0.h>
 
+#include <plat/irqs.h>
+
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
 
@@ -31,17 +33,15 @@ void __iomem *gic_dist_base_addr;
 
 void __init gic_init_irq(void)
 {
-       void __iomem *gic_cpu_base;
-
        /* Static mapping, never released */
        gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
        BUG_ON(!gic_dist_base_addr);
 
        /* Static mapping, never released */
-       gic_cpu_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
-       BUG_ON(!gic_cpu_base);
+       omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
+       BUG_ON(!omap_irq_base);
 
-       gic_init(0, 29, gic_dist_base_addr, gic_cpu_base);
+       gic_init(0, 29, gic_dist_base_addr, omap_irq_base);
 }
 
 #ifdef CONFIG_CACHE_L2X0
index 5a25098ea7ea8ed3b8d30fcd3f1518dfa66db7f7..c88432005665418b1897559461862d7c17fc4d8f 100644 (file)
 #define INTCPS_NR_IRQS         96
 
 #ifndef __ASSEMBLY__
-extern void omap_init_irq(void);
+extern void __iomem *omap_irq_base;
+void omap1_init_irq(void);
+void omap2_init_irq(void);
+void omap3_init_irq(void);
+void ti816x_init_irq(void);
 extern int omap_irq_pending(void);
 void omap_intc_save_context(void);
 void omap_intc_restore_context(void);