diff options
author | Tony Lindgren <tony@atomide.com> | 2008-10-06 08:49:16 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-10-06 08:49:16 -0400 |
commit | 0e564848693b06b037ec05e68c9e4b266250789e (patch) | |
tree | e73546b541cd03ec6a36b2f82177fca1b171574c /arch/arm/plat-omap | |
parent | 1835f1d720786138c43147448f4527dd380c1e33 (diff) |
ARM: OMAP2: Use omap_globals for CPU detection for multi-omap
This allows to get rid of the ifdefs and will allow simpler
CPU detection in the future.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/common.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/common.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/cpu.h | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 20e8db5fe32a..e3143fe9cb29 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -248,6 +248,7 @@ static struct omap_globals *omap2_globals; | |||
248 | 248 | ||
249 | static void __init __omap2_set_globals(void) | 249 | static void __init __omap2_set_globals(void) |
250 | { | 250 | { |
251 | omap2_set_globals_tap(omap2_globals); | ||
251 | omap2_set_globals_memory(omap2_globals); | 252 | omap2_set_globals_memory(omap2_globals); |
252 | omap2_set_globals_control(omap2_globals); | 253 | omap2_set_globals_control(omap2_globals); |
253 | omap2_set_globals_prcm(omap2_globals); | 254 | omap2_set_globals_prcm(omap2_globals); |
@@ -258,6 +259,7 @@ static void __init __omap2_set_globals(void) | |||
258 | #if defined(CONFIG_ARCH_OMAP2420) | 259 | #if defined(CONFIG_ARCH_OMAP2420) |
259 | 260 | ||
260 | static struct omap_globals omap242x_globals = { | 261 | static struct omap_globals omap242x_globals = { |
262 | .class = OMAP242X_CLASS, | ||
261 | .tap = OMAP2_IO_ADDRESS(0x48014000), | 263 | .tap = OMAP2_IO_ADDRESS(0x48014000), |
262 | .sdrc = OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE), | 264 | .sdrc = OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE), |
263 | .sms = OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE), | 265 | .sms = OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE), |
@@ -276,6 +278,7 @@ void __init omap2_set_globals_242x(void) | |||
276 | #if defined(CONFIG_ARCH_OMAP2430) | 278 | #if defined(CONFIG_ARCH_OMAP2430) |
277 | 279 | ||
278 | static struct omap_globals omap243x_globals = { | 280 | static struct omap_globals omap243x_globals = { |
281 | .class = OMAP243X_CLASS, | ||
279 | .tap = OMAP2_IO_ADDRESS(0x4900a000), | 282 | .tap = OMAP2_IO_ADDRESS(0x4900a000), |
280 | .sdrc = OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE), | 283 | .sdrc = OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE), |
281 | .sms = OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE), | 284 | .sms = OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE), |
@@ -294,6 +297,7 @@ void __init omap2_set_globals_243x(void) | |||
294 | #if defined(CONFIG_ARCH_OMAP3430) | 297 | #if defined(CONFIG_ARCH_OMAP3430) |
295 | 298 | ||
296 | static struct omap_globals omap343x_globals = { | 299 | static struct omap_globals omap343x_globals = { |
300 | .class = OMAP343X_CLASS, | ||
297 | .tap = OMAP2_IO_ADDRESS(0x4830A000), | 301 | .tap = OMAP2_IO_ADDRESS(0x4830A000), |
298 | .sdrc = OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE), | 302 | .sdrc = OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE), |
299 | .sms = OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE), | 303 | .sms = OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE), |
diff --git a/arch/arm/plat-omap/include/mach/common.h b/arch/arm/plat-omap/include/mach/common.h index 515c6286582c..ef70e2b0f054 100644 --- a/arch/arm/plat-omap/include/mach/common.h +++ b/arch/arm/plat-omap/include/mach/common.h | |||
@@ -50,6 +50,7 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, | |||
50 | 50 | ||
51 | /* IO bases for various OMAP processors */ | 51 | /* IO bases for various OMAP processors */ |
52 | struct omap_globals { | 52 | struct omap_globals { |
53 | u32 class; /* OMAP class to detect */ | ||
53 | void __iomem *tap; /* Control module ID code */ | 54 | void __iomem *tap; /* Control module ID code */ |
54 | void __iomem *sdrc; /* SDRAM Controller */ | 55 | void __iomem *sdrc; /* SDRAM Controller */ |
55 | void __iomem *sms; /* SDRAM Memory Scheduler */ | 56 | void __iomem *sms; /* SDRAM Memory Scheduler */ |
@@ -63,6 +64,7 @@ void omap2_set_globals_243x(void); | |||
63 | void omap2_set_globals_343x(void); | 64 | void omap2_set_globals_343x(void); |
64 | 65 | ||
65 | /* These get called from omap2_set_globals_xxxx(), do not call these */ | 66 | /* These get called from omap2_set_globals_xxxx(), do not call these */ |
67 | void omap2_set_globals_tap(struct omap_globals *); | ||
66 | void omap2_set_globals_memory(struct omap_globals *); | 68 | void omap2_set_globals_memory(struct omap_globals *); |
67 | void omap2_set_globals_control(struct omap_globals *); | 69 | void omap2_set_globals_control(struct omap_globals *); |
68 | void omap2_set_globals_prcm(struct omap_globals *); | 70 | void omap2_set_globals_prcm(struct omap_globals *); |
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h index 05aee0eda34f..e0464187209d 100644 --- a/arch/arm/plat-omap/include/mach/cpu.h +++ b/arch/arm/plat-omap/include/mach/cpu.h | |||
@@ -346,9 +346,14 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
346 | get_sil_revision(system_rev) | 346 | get_sil_revision(system_rev) |
347 | 347 | ||
348 | /* Various silicon macros defined here */ | 348 | /* Various silicon macros defined here */ |
349 | #define OMAP242X_CLASS 0x24200000 | ||
349 | #define OMAP2420_REV_ES1_0 0x24200000 | 350 | #define OMAP2420_REV_ES1_0 0x24200000 |
350 | #define OMAP2420_REV_ES2_0 0x24201000 | 351 | #define OMAP2420_REV_ES2_0 0x24201000 |
352 | |||
353 | #define OMAP243X_CLASS 0x24300000 | ||
351 | #define OMAP2430_REV_ES1_0 0x24300000 | 354 | #define OMAP2430_REV_ES1_0 0x24300000 |
355 | |||
356 | #define OMAP343X_CLASS 0x34300000 | ||
352 | #define OMAP3430_REV_ES1_0 0x34300000 | 357 | #define OMAP3430_REV_ES1_0 0x34300000 |
353 | #define OMAP3430_REV_ES2_0 0x34301000 | 358 | #define OMAP3430_REV_ES2_0 0x34301000 |
354 | #define OMAP3430_REV_ES2_1 0x34302000 | 359 | #define OMAP3430_REV_ES2_1 0x34302000 |