omap2/3/4: Fix omap2_map_common_io for multi-omap
authorTony Lindgren <tony@atomide.com>
Fri, 12 Feb 2010 20:26:47 +0000 (12:26 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 15 Feb 2010 17:26:58 +0000 (09:26 -0800)
Fix omap2_map_common_io for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
22 files changed:
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-am3517evm.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-cm-t35.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-omap3pandora.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-zoom2.c
arch/arm/mach-omap2/board-zoom3.c
arch/arm/mach-omap2/io.c
arch/arm/plat-omap/include/plat/io.h

index e508904fb67e3addfe4066f44860e6ecd737afd8..1a619787bd80ff8d90f38ddf14c7659fb0b3cfa0 100644 (file)
@@ -215,7 +215,7 @@ static void __init omap_2430sdp_init(void)
 static void __init omap_2430sdp_map_io(void)
 {
        omap2_set_globals_243x();
-       omap2_map_common_io();
+       omap243x_map_common_io();
 }
 
 MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
index c90b0d0b1927e58911dad6d7bfe593b712323557..eda4f6448cce7c7aed6de37b954bffd27554baab 100644 (file)
@@ -674,7 +674,7 @@ static void __init omap_3430sdp_init(void)
 static void __init omap_3430sdp_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
index c178e68472f842d227ce4381c5c80b5beb5a5047..4386d2b4a785dcceaaecacb245024442312464d0 100755 (executable)
@@ -69,7 +69,7 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
 static void __init omap_sdp_map_io(void)
 {
        omap2_set_globals_36xx();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 static struct omap_board_config_kernel sdp_config[] __initdata = {
index 0c6be6b4a7e2b6f3fc40ba803c7f574289ebf0a8..cc4c00de32b3fbb55e341fc76b5297c0440bb4ba 100644 (file)
@@ -87,7 +87,7 @@ static void __init omap_4430sdp_init(void)
 static void __init omap_4430sdp_map_io(void)
 {
        omap2_set_globals_443x();
-       omap2_map_common_io();
+       omap44xx_map_common_io();
 }
 
 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
index 54af5f8d818484e3b3f07d5609cc73ba9bc5e0dd..07b857de250090abec307e48eb5212aa3687398c 100644 (file)
@@ -228,7 +228,7 @@ static void __init am3517_evm_init(void)
 static void __init am3517_evm_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
index fbbd68d69cc8cc50d0f426bcc67db622f1bf5c16..aa69fb999748af3698a6950f9549a59c8260f5a7 100644 (file)
@@ -337,7 +337,7 @@ static void __init omap_apollon_init(void)
 static void __init omap_apollon_map_io(void)
 {
        omap2_set_globals_242x();
-       omap2_map_common_io();
+       omap242x_map_common_io();
 }
 
 MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
index 85b45437d51a099a637979dfcd91bf9db134da19..0e292317c0ca4cc50e52ee961c5691a75f9f62cf 100644 (file)
@@ -710,7 +710,7 @@ static void __init cm_t35_init_irq(void)
 static void __init cm_t35_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 static struct omap_board_mux board_mux[] __initdata = {
index 7e6e6ca88be5724ac5cb18271812772d54e4c11e..16cc06860670ed7cf22c4a6e1d991d6e76fe3b89 100644 (file)
@@ -50,7 +50,7 @@ static void __init omap_generic_init(void)
 static void __init omap_generic_map_io(void)
 {
        omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */
-       omap2_map_common_io();
+       omap242x_map_common_io();
 }
 
 MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
index cfb7f1257d209aedbd2620f8a9d4b248e43f8793..5c49c407dd51bd233707a31669b7a5d00c176ff4 100644 (file)
@@ -370,7 +370,7 @@ static void __init omap_h4_init(void)
 static void __init omap_h4_map_io(void)
 {
        omap2_set_globals_242x();
-       omap2_map_common_io();
+       omap242x_map_common_io();
 }
 
 MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
index 117b8fd7e3a6445cba151b787749df9419acc00d..9f754338449836d7124045b4b0bf375e82f43179 100644 (file)
@@ -246,7 +246,7 @@ static void __init igep2_init(void)
 static void __init igep2_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(IGEP0020, "IGEP v2 board")
index 995d4a2b2dfd5fa61c7337ee350d1e0e60b5f000..f1699674a2fc13c8d18ccdfea4ee775324add31a 100644 (file)
@@ -404,7 +404,7 @@ static void __init omap_ldp_init(void)
 static void __init omap_ldp_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OMAP_LDP, "OMAP LDP board")
index 764ab1ed576db967491ade87b26380ee1e0b83b9..9de03f8e2e680c40a8c985f0e76dd2a82eb220c8 100644 (file)
@@ -99,7 +99,7 @@ static void __init n8x0_onenand_init(void) {}
 static void __init n8x0_map_io(void)
 {
        omap2_set_globals_242x();
-       omap2_map_common_io();
+       omap242x_map_common_io();
 }
 
 static void __init n8x0_init_irq(void)
index 231cb4ec1847cfd51c038e2d533c7f40ae9d1295..bf91bf7bd9210c61a8c0f5c37172fb3f493267a9 100644 (file)
@@ -455,7 +455,7 @@ static void __init omap3_beagle_init(void)
 static void __init omap3_beagle_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
index 822df79ce89187c2375a5f3172d9bf0fa183dc9b..a221b7a1fcc61f7f6643d56c629419331710d9b6 100644 (file)
@@ -702,7 +702,7 @@ static void __init omap3_evm_init(void)
 static void __init omap3_evm_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OMAP3EVM, "OMAP3 EVM")
index ef17cf1ab6d7cc37b132a30d3b443ea4e93f9bf0..bc482abdd5d436b91793acb752c8e354c31f5a19 100644 (file)
@@ -423,7 +423,7 @@ static void __init omap3pandora_init(void)
 static void __init omap3pandora_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
index fe3d22cb24573390540295730ca4b4f58f6a7d00..63436e9c206988253057c3241ac910e6bffb1d7b 100644 (file)
@@ -557,7 +557,7 @@ static void __init omap3_touchbook_init(void)
 static void __init omap3_touchbook_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
index d192dd98a591779ac126fdf3c3ab0fbb2b489f51..61abe09072652e29b0d0f8eccb7159a49c3ac1b8 100644 (file)
@@ -469,7 +469,7 @@ static void __init overo_init(void)
 static void __init overo_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OVERO, "Gumstix Overo")
index 67bb3476b7078cb42f789005e98f03868241e7b8..6a49f916103da9d0dc23741293334ebfc8a5df76 100644 (file)
@@ -93,7 +93,7 @@ static void __init rx51_init(void)
 static void __init rx51_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
index bb87cf7878ff6e0931e2b1042c82ae4299d93cbf..9a26f84b11417f355586f4f45b19d1be5aae52d0 100644 (file)
@@ -87,7 +87,7 @@ static void __init omap_zoom2_init(void)
 static void __init omap_zoom2_map_io(void)
 {
        omap2_set_globals_343x();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
index 456b69072679ea87dd9952c01c1700f55455a8d4..5e208942ca713d3888b38cb944ed99258aac5482 100644 (file)
@@ -27,7 +27,7 @@
 static void __init omap_zoom_map_io(void)
 {
        omap2_set_globals_36xx();
-       omap2_map_common_io();
+       omap34xx_map_common_io();
 }
 
 static struct omap_board_config_kernel zoom_config[] __initdata = {
index 01ef2ae93593adcf501cbe15267375d17fe17e44..31296cbecb0b2f6ce5aa1600c12bf523b0f7601a 100644 (file)
@@ -236,37 +236,54 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
 };
 #endif
 
-void __init omap2_map_common_io(void)
+static void __init _omap2_map_common_io(void)
+{
+       /* Normally devicemaps_init() would flush caches and tlb after
+        * mdesc->map_io(), but we must also do it here because of the CPU
+        * revision check below.
+        */
+       local_flush_tlb_all();
+       flush_cache_all();
+
+       omap2_check_revision();
+       omap_sram_init();
+       omapfb_reserve_sdram();
+       omap_vram_reserve_sdram();
+}
+
+#ifdef CONFIG_ARCH_OMAP2420
+void __init omap242x_map_common_io()
 {
-#if defined(CONFIG_ARCH_OMAP2420)
        iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
        iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
+       _omap2_map_common_io();
+}
 #endif
 
-#if defined(CONFIG_ARCH_OMAP2430)
+#ifdef CONFIG_ARCH_OMAP2430
+void __init omap243x_map_common_io()
+{
        iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
        iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
+       _omap2_map_common_io();
+}
 #endif
 
-#if defined(CONFIG_ARCH_OMAP34XX)
+#ifdef CONFIG_ARCH_OMAP34XX
+void __init omap34xx_map_common_io()
+{
        iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
+       _omap2_map_common_io();
+}
 #endif
 
-#if defined(CONFIG_ARCH_OMAP4)
+#ifdef CONFIG_ARCH_OMAP4
+void __init omap44xx_map_common_io()
+{
        iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
-#endif
-       /* Normally devicemaps_init() would flush caches and tlb after
-        * mdesc->map_io(), but we must also do it here because of the CPU
-        * revision check below.
-        */
-       local_flush_tlb_all();
-       flush_cache_all();
-
-       omap2_check_revision();
-       omap_sram_init();
-       omapfb_reserve_sdram();
-       omap_vram_reserve_sdram();
+       _omap2_map_common_io();
 }
+#endif
 
 /*
  * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters
index a3e7b471bcba93e2b25119a4b04bfc2af5e44f7c..19257bbbc9f3726061f1d0ee6d47d6059947482e 100644 (file)
@@ -268,7 +268,38 @@ struct omap_sdrc_params;
 extern void omap1_map_common_io(void);
 extern void omap1_init_common_hw(void);
 
-extern void omap2_map_common_io(void);
+#ifdef CONFIG_ARCH_OMAP2420
+extern void omap242x_map_common_io(void);
+#else
+static inline void omap242x_map_common_io(void)
+{
+}
+#endif
+
+#ifdef CONFIG_ARCH_OMAP2430
+extern void omap243x_map_common_io(void);
+#else
+static inline void omap243x_map_common_io(void)
+{
+}
+#endif
+
+#ifdef CONFIG_ARCH_OMAP34XX
+extern void omap34xx_map_common_io(void);
+#else
+static inline void omap34xx_map_common_io(void)
+{
+}
+#endif
+
+#ifdef CONFIG_ARCH_OMAP4
+extern void omap44xx_map_common_io(void);
+#else
+static inline void omap44xx_map_common_io(void)
+{
+}
+#endif
+
 extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
                                 struct omap_sdrc_params *sdrc_cs1);