diff options
author | Tony Lindgren <tony@atomide.com> | 2008-10-06 12:49:16 (GMT) |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-10-06 12:49:16 (GMT) |
commit | 0e564848693b06b037ec05e68c9e4b266250789e (patch) | |
tree | e73546b541cd03ec6a36b2f82177fca1b171574c /arch/arm/plat-omap | |
parent | 1835f1d720786138c43147448f4527dd380c1e33 (diff) | |
download | linux-fsl-qoriq-0e564848693b06b037ec05e68c9e4b266250789e.tar.xz |
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 20e8db5..e3143fe 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; static void __init __omap2_set_globals(void) { + omap2_set_globals_tap(omap2_globals); omap2_set_globals_memory(omap2_globals); omap2_set_globals_control(omap2_globals); omap2_set_globals_prcm(omap2_globals); @@ -258,6 +259,7 @@ static void __init __omap2_set_globals(void) #if defined(CONFIG_ARCH_OMAP2420) static struct omap_globals omap242x_globals = { + .class = OMAP242X_CLASS, .tap = OMAP2_IO_ADDRESS(0x48014000), .sdrc = OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE), .sms = OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE), @@ -276,6 +278,7 @@ void __init omap2_set_globals_242x(void) #if defined(CONFIG_ARCH_OMAP2430) static struct omap_globals omap243x_globals = { + .class = OMAP243X_CLASS, .tap = OMAP2_IO_ADDRESS(0x4900a000), .sdrc = OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE), .sms = OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE), @@ -294,6 +297,7 @@ void __init omap2_set_globals_243x(void) #if defined(CONFIG_ARCH_OMAP3430) static struct omap_globals omap343x_globals = { + .class = OMAP343X_CLASS, .tap = OMAP2_IO_ADDRESS(0x4830A000), .sdrc = OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE), .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 515c628..ef70e2b 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, /* IO bases for various OMAP processors */ struct omap_globals { + u32 class; /* OMAP class to detect */ void __iomem *tap; /* Control module ID code */ void __iomem *sdrc; /* SDRAM Controller */ void __iomem *sms; /* SDRAM Memory Scheduler */ @@ -63,6 +64,7 @@ void omap2_set_globals_243x(void); void omap2_set_globals_343x(void); /* These get called from omap2_set_globals_xxxx(), do not call these */ +void omap2_set_globals_tap(struct omap_globals *); void omap2_set_globals_memory(struct omap_globals *); void omap2_set_globals_control(struct omap_globals *); 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 05aee0e..e046418 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) get_sil_revision(system_rev) /* Various silicon macros defined here */ +#define OMAP242X_CLASS 0x24200000 #define OMAP2420_REV_ES1_0 0x24200000 #define OMAP2420_REV_ES2_0 0x24201000 + +#define OMAP243X_CLASS 0x24300000 #define OMAP2430_REV_ES1_0 0x24300000 + +#define OMAP343X_CLASS 0x34300000 #define OMAP3430_REV_ES1_0 0x34300000 #define OMAP3430_REV_ES2_0 0x34301000 #define OMAP3430_REV_ES2_1 0x34302000 |