]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Runtime constants: introduce omap2_set_globals_*()
authorPaul Walmsley <paul@pwsan.com>
Wed, 21 Nov 2007 00:16:21 +0000 (17:16 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 23 Nov 2007 21:49:30 +0000 (13:49 -0800)
Add the omap2_set_globals_{242x,243x,343x}() functions.  These
functions are called early upon boot in the map_io() functions in the
board-specific init files.  The functions are currently no-ops.  Later
patches augment these functions to set global variables to the base
virtual addresses of OMAP modules.  This makes it possible to write
code that can run without modification on multiple OMAP chip
revisions.

The *_set_globals_* functions are added into
arch/arm/plat-omap/common.c.  This patch currently only introduces
OMAP2 and OMAP3 functions, but a later patch introduces an
OMAP16XX-specific version, omap1_set_globals_16xx().

Also, while we are here, we get rid of the unused OMAP_L4_BASE define.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-2430osk.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-n800.c
arch/arm/plat-omap/common.c
include/asm-arm/arch-omap/common.h
include/asm-arm/arch-omap/omap24xx.h
include/asm-arm/arch-omap/omap34xx.h

index 116fb6e391b095a1e8a9cc8db49160154e776e98..146dba3ce776a7b514e46151c56b104f6e0cb975 100644 (file)
@@ -125,6 +125,7 @@ static void __init omap_2430osk_init(void)
 
 static void __init omap_2430osk_map_io(void)
 {
+       omap2_set_globals_243x();
        omap2_map_common_io();
 }
 
index 0886f51c80b6e99c07d4476ddb5216ce201806d7..5e6801929bd88d45a809a242f8af17f949a8d3db 100644 (file)
@@ -392,6 +392,7 @@ static void __init omap_2430sdp_init(void)
 
 static void __init omap_2430sdp_map_io(void)
 {
+       omap2_set_globals_243x();
        omap2_map_common_io();
 }
 
index cd5f4f713306aa55a5d38f4d82f3ca9db5677056..55691b52e0fd42e57aca914343c367e4b9540264 100644 (file)
@@ -320,6 +320,7 @@ static void __init omap_3430sdp_init(void)
 
 static void __init omap_3430sdp_map_io(void)
 {
+       omap2_set_globals_343x();
        omap2_map_common_io();
 }
 arch_initcall(omap3430_i2c_init);
index 1932d73463f55789ff967b90b0c3be466cb13238..9cff0278aa00950d1dddcbf8c7c72d3f2124aad9 100644 (file)
@@ -390,6 +390,7 @@ static void __init omap_apollon_init(void)
 
 static void __init omap_apollon_map_io(void)
 {
+       omap2_set_globals_242x();
        omap2_map_common_io();
 }
 
index 4226464b465f8e5d2787fbeb431f5c738f65b0a7..6e7b13215c4cf3f7e852654c2bcd85a6eae142ca 100644 (file)
@@ -67,6 +67,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();
 }
 
index 8fde8388cb46ce30ed0afe449ebcc4379b12c20e..03b5da216191e8afebe99044d5fa076ab78d5436 100644 (file)
@@ -715,6 +715,7 @@ static void __init omap_h4_init(void)
 
 static void __init omap_h4_map_io(void)
 {
+       omap2_set_globals_242x();
        omap2_map_common_io();
 }
 
index 1604513271b2d9d474af6add267a2a92daa9983d..4473fd54e3435fd2f532db661cbd03af465aaf0a 100644 (file)
@@ -479,6 +479,7 @@ static void __init nokia_n800_map_io(void)
        omap_board_config = n800_config;
        omap_board_config_size = ARRAY_SIZE(n800_config);
 
+       omap2_set_globals_242x();
        omap2_map_common_io();
 }
 
index 7cb91222dbe1115aeae0af01846c1a5efa324ef5..d129ccb3eba5b70fb7ae7edf1ffac26a4359fd34 100644 (file)
@@ -253,3 +253,24 @@ static int __init omap_init_clocksource_32k(void)
 arch_initcall(omap_init_clocksource_32k);
 
 #endif /* TIMER_32K_SYNCHRONIZED */
+
+/* Global address base setup code */
+
+#if defined(CONFIG_ARCH_OMAP2420)
+void __init omap2_set_globals_242x(void)
+{
+}
+#endif
+
+#if defined(CONFIG_ARCH_OMAP2430)
+void __init omap2_set_globals_243x(void)
+{
+}
+#endif
+
+#if defined(CONFIG_ARCH_OMAP3430)
+void __init omap2_set_globals_343x(void)
+{
+}
+#endif
+
index 17979272b6a907f2a0d3885bb4795459bb7a9343..0255d822d7ceee1eab44742c1b17e58e6803692b 100644 (file)
@@ -44,4 +44,8 @@ extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
 #define omap_register_i2c_bus(...)     do { } while (0)
 #endif
 
+void omap2_set_globals_242x(void);
+void omap2_set_globals_243x(void);
+void omap2_set_globals_343x(void);
+
 #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
index 1eb574974e489947ca7b3b928a879d1cf12747a4..8c74186f27bb8d38f9a968675371d87b68530f8e 100644 (file)
@@ -85,7 +85,6 @@
 #define OMAP2_PRM_BASE         OMAP2420_PRM_BASE
 #define OMAP2_SDRC_BASE                OMAP2420_SDRC_BASE
 #define OMAP2_SMS_BASE         OMAP2420_SMS_BASE
-#define OMAP2_L4_BASE          L4_24XX_BASE
 #define OMAP2_VA_IC_BASE       IO_ADDRESS(OMAP24XX_IC_BASE)
 #define OMAP2_CTRL_BASE                OMAP2420_CTRL_BASE
 
@@ -97,7 +96,6 @@
 #define OMAP2_PRM_BASE         OMAP2430_PRM_BASE
 #define OMAP2_SDRC_BASE                OMAP243X_SDRC_BASE
 #define OMAP2_SMS_BASE         OMAP243X_SMS_BASE
-#define OMAP2_L4_BASE          L4_24XX_BASE
 #define OMAP2_VA_IC_BASE       IO_ADDRESS(OMAP24XX_IC_BASE)
 #define OMAP2_CTRL_BASE                OMAP243X_CTRL_BASE
 
index 93275826d831194490ca24d9c1a8f11ed1b861b7..f54dedf82c05c27a6683251193cae8345d07ff37 100644 (file)
@@ -69,7 +69,6 @@
 #define OMAP2_PRM_BASE                 OMAP3430_PRM_BASE
 #define OMAP2_SDRC_BASE                        OMAP343X_SDRC_BASE
 #define OMAP2_SMS_BASE                 OMAP343X_SMS_BASE
-#define OMAP2_L4_BASE                  L4_34XX_BASE
 #define OMAP2_VA_IC_BASE               IO_ADDRESS(OMAP34XX_IC_BASE)
 #define OMAP2_CTRL_BASE                        OMAP3430_CTRL_BASE
 #define OMAP34XX_CONTROL_DEVCONF0      (L4_34XX_BASE + 0x2274)