aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/common.c')
-rw-r--r--arch/arm/plat-omap/common.c59
1 files changed, 50 insertions, 9 deletions
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index bd1cef2c3c14..8d04929a3c75 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -26,6 +26,7 @@
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/setup.h> 27#include <asm/setup.h>
28 28
29#include <asm/arch/common.h>
29#include <asm/arch/board.h> 30#include <asm/arch/board.h>
30#include <asm/arch/control.h> 31#include <asm/arch/control.h>
31#include <asm/arch/mux.h> 32#include <asm/arch/mux.h>
@@ -241,30 +242,70 @@ arch_initcall(omap_init_clocksource_32k);
241 242
242/* Global address base setup code */ 243/* Global address base setup code */
243 244
245#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
246
247static struct omap_globals *omap2_globals;
248
249static void __init __omap2_set_globals(void)
250{
251 omap2_set_globals_memory(omap2_globals);
252 omap2_set_globals_control(omap2_globals);
253 omap2_set_globals_prcm(omap2_globals);
254}
255
256#endif
257
244#if defined(CONFIG_ARCH_OMAP2420) 258#if defined(CONFIG_ARCH_OMAP2420)
259
260static struct omap_globals omap242x_globals = {
261 .tap = (__force void __iomem *)OMAP2_IO_ADDRESS(0x48014000),
262 .sdrc = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SDRC_BASE),
263 .sms = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE),
264 .ctrl = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_CTRL_BASE),
265 .prm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_PRM_BASE),
266 .cm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_CM_BASE),
267};
268
245void __init omap2_set_globals_242x(void) 269void __init omap2_set_globals_242x(void)
246{ 270{
247 omap2_sdrc_base = OMAP2420_SDRC_BASE; 271 omap2_globals = &omap242x_globals;
248 omap2_sms_base = OMAP2420_SMS_BASE; 272 __omap2_set_globals();
249 omap_ctrl_base_set(OMAP2420_CTRL_BASE);
250} 273}
251#endif 274#endif
252 275
253#if defined(CONFIG_ARCH_OMAP2430) 276#if defined(CONFIG_ARCH_OMAP2430)
277
278static struct omap_globals omap243x_globals = {
279 .tap = (__force void __iomem *)OMAP2_IO_ADDRESS(0x4900a000),
280 .sdrc = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SDRC_BASE),
281 .sms = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE),
282 .ctrl = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE),
283 .prm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2430_PRM_BASE),
284 .cm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP2430_CM_BASE),
285};
286
254void __init omap2_set_globals_243x(void) 287void __init omap2_set_globals_243x(void)
255{ 288{
256 omap2_sdrc_base = OMAP243X_SDRC_BASE; 289 omap2_globals = &omap243x_globals;
257 omap2_sms_base = OMAP243X_SMS_BASE; 290 __omap2_set_globals();
258 omap_ctrl_base_set(OMAP243X_CTRL_BASE);
259} 291}
260#endif 292#endif
261 293
262#if defined(CONFIG_ARCH_OMAP3430) 294#if defined(CONFIG_ARCH_OMAP3430)
295
296static struct omap_globals omap343x_globals = {
297 .tap = (__force void __iomem *)OMAP2_IO_ADDRESS(0x4830A000),
298 .sdrc = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SDRC_BASE),
299 .sms = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE),
300 .ctrl = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE),
301 .prm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP3430_PRM_BASE),
302 .cm = (__force void __iomem *)OMAP2_IO_ADDRESS(OMAP3430_CM_BASE),
303};
304
263void __init omap2_set_globals_343x(void) 305void __init omap2_set_globals_343x(void)
264{ 306{
265 omap2_sdrc_base = OMAP343X_SDRC_BASE; 307 omap2_globals = &omap343x_globals;
266 omap2_sms_base = OMAP343X_SMS_BASE; 308 __omap2_set_globals();
267 omap_ctrl_base_set(OMAP343X_CTRL_BASE);
268} 309}
269#endif 310#endif
270 311