diff options
author | Paul Walmsley <paul@pwsan.com> | 2012-10-29 22:50:21 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-11-08 14:33:07 -0500 |
commit | b6a4226c14001b0aa20b11c69190cb89d2237d3d (patch) | |
tree | e7c0f4b571cc010767c01d8b402762e49540c563 /arch/arm/mach-omap2/io.c | |
parent | 76e0e16d91af22dd6313000ff8018069123f8ed0 (diff) |
ARM: OMAP2+: common: remove mach-omap2/common.c globals and map_common_io code
Get rid of the mach-omap2/common.c globals by moving the global
initialization for IP block addresses that must occur early into
mach-omap2/io.c. In the process, remove the *_map_common_io*() and
SoC-specific *set_globals* functions.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Vaibhav Hiremath <hvaibhav@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/io.c')
-rw-r--r-- | arch/arm/mach-omap2/io.c | 77 |
1 files changed, 63 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 4fadc7895579..a204b7055007 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <plat-omap/dma-omap.h> | 28 | #include <plat-omap/dma-omap.h> |
29 | 29 | ||
30 | #include "../plat-omap/sram.h" | 30 | #include "../plat-omap/sram.h" |
31 | #include <plat/prcm.h> | ||
31 | 32 | ||
32 | #include "omap_hwmod.h" | 33 | #include "omap_hwmod.h" |
33 | #include "soc.h" | 34 | #include "soc.h" |
@@ -42,6 +43,7 @@ | |||
42 | #include "clock44xx.h" | 43 | #include "clock44xx.h" |
43 | #include "omap-pm.h" | 44 | #include "omap-pm.h" |
44 | #include "sdrc.h" | 45 | #include "sdrc.h" |
46 | #include "control.h" | ||
45 | #include "serial.h" | 47 | #include "serial.h" |
46 | 48 | ||
47 | /* | 49 | /* |
@@ -265,7 +267,7 @@ static struct map_desc omap54xx_io_desc[] __initdata = { | |||
265 | #endif | 267 | #endif |
266 | 268 | ||
267 | #ifdef CONFIG_SOC_OMAP2420 | 269 | #ifdef CONFIG_SOC_OMAP2420 |
268 | void __init omap242x_map_common_io(void) | 270 | void __init omap242x_map_io(void) |
269 | { | 271 | { |
270 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 272 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
271 | iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); | 273 | iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc)); |
@@ -273,7 +275,7 @@ void __init omap242x_map_common_io(void) | |||
273 | #endif | 275 | #endif |
274 | 276 | ||
275 | #ifdef CONFIG_SOC_OMAP2430 | 277 | #ifdef CONFIG_SOC_OMAP2430 |
276 | void __init omap243x_map_common_io(void) | 278 | void __init omap243x_map_io(void) |
277 | { | 279 | { |
278 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 280 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
279 | iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); | 281 | iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc)); |
@@ -281,28 +283,28 @@ void __init omap243x_map_common_io(void) | |||
281 | #endif | 283 | #endif |
282 | 284 | ||
283 | #ifdef CONFIG_ARCH_OMAP3 | 285 | #ifdef CONFIG_ARCH_OMAP3 |
284 | void __init omap34xx_map_common_io(void) | 286 | void __init omap3_map_io(void) |
285 | { | 287 | { |
286 | iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); | 288 | iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc)); |
287 | } | 289 | } |
288 | #endif | 290 | #endif |
289 | 291 | ||
290 | #ifdef CONFIG_SOC_TI81XX | 292 | #ifdef CONFIG_SOC_TI81XX |
291 | void __init omapti81xx_map_common_io(void) | 293 | void __init ti81xx_map_io(void) |
292 | { | 294 | { |
293 | iotable_init(omapti81xx_io_desc, ARRAY_SIZE(omapti81xx_io_desc)); | 295 | iotable_init(omapti81xx_io_desc, ARRAY_SIZE(omapti81xx_io_desc)); |
294 | } | 296 | } |
295 | #endif | 297 | #endif |
296 | 298 | ||
297 | #ifdef CONFIG_SOC_AM33XX | 299 | #ifdef CONFIG_SOC_AM33XX |
298 | void __init omapam33xx_map_common_io(void) | 300 | void __init am33xx_map_io(void) |
299 | { | 301 | { |
300 | iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc)); | 302 | iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc)); |
301 | } | 303 | } |
302 | #endif | 304 | #endif |
303 | 305 | ||
304 | #ifdef CONFIG_ARCH_OMAP4 | 306 | #ifdef CONFIG_ARCH_OMAP4 |
305 | void __init omap44xx_map_common_io(void) | 307 | void __init omap4_map_io(void) |
306 | { | 308 | { |
307 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); | 309 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); |
308 | omap_barriers_init(); | 310 | omap_barriers_init(); |
@@ -310,7 +312,7 @@ void __init omap44xx_map_common_io(void) | |||
310 | #endif | 312 | #endif |
311 | 313 | ||
312 | #ifdef CONFIG_SOC_OMAP5 | 314 | #ifdef CONFIG_SOC_OMAP5 |
313 | void __init omap5_map_common_io(void) | 315 | void __init omap5_map_io(void) |
314 | { | 316 | { |
315 | iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); | 317 | iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); |
316 | } | 318 | } |
@@ -377,7 +379,14 @@ static void __init omap_hwmod_init_postsetup(void) | |||
377 | #ifdef CONFIG_SOC_OMAP2420 | 379 | #ifdef CONFIG_SOC_OMAP2420 |
378 | void __init omap2420_init_early(void) | 380 | void __init omap2420_init_early(void) |
379 | { | 381 | { |
380 | omap2_set_globals_242x(); | 382 | omap2_set_globals_tap(OMAP242X_CLASS, OMAP2_L4_IO_ADDRESS(0x48014000)); |
383 | omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE), | ||
384 | OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE)); | ||
385 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE), | ||
386 | NULL); | ||
387 | omap2_set_globals_prcm(OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE), | ||
388 | OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE), | ||
389 | NULL, NULL); | ||
381 | omap2xxx_check_revision(); | 390 | omap2xxx_check_revision(); |
382 | omap_common_init_early(); | 391 | omap_common_init_early(); |
383 | omap2xxx_voltagedomains_init(); | 392 | omap2xxx_voltagedomains_init(); |
@@ -399,7 +408,14 @@ void __init omap2420_init_late(void) | |||
399 | #ifdef CONFIG_SOC_OMAP2430 | 408 | #ifdef CONFIG_SOC_OMAP2430 |
400 | void __init omap2430_init_early(void) | 409 | void __init omap2430_init_early(void) |
401 | { | 410 | { |
402 | omap2_set_globals_243x(); | 411 | omap2_set_globals_tap(OMAP243X_CLASS, OMAP2_L4_IO_ADDRESS(0x4900a000)); |
412 | omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE), | ||
413 | OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE)); | ||
414 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE), | ||
415 | NULL); | ||
416 | omap2_set_globals_prcm(OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE), | ||
417 | OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE), | ||
418 | NULL, NULL); | ||
403 | omap2xxx_check_revision(); | 419 | omap2xxx_check_revision(); |
404 | omap_common_init_early(); | 420 | omap_common_init_early(); |
405 | omap2xxx_voltagedomains_init(); | 421 | omap2xxx_voltagedomains_init(); |
@@ -425,7 +441,14 @@ void __init omap2430_init_late(void) | |||
425 | #ifdef CONFIG_ARCH_OMAP3 | 441 | #ifdef CONFIG_ARCH_OMAP3 |
426 | void __init omap3_init_early(void) | 442 | void __init omap3_init_early(void) |
427 | { | 443 | { |
428 | omap2_set_globals_3xxx(); | 444 | omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000)); |
445 | omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), | ||
446 | OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE)); | ||
447 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE), | ||
448 | NULL); | ||
449 | omap2_set_globals_prcm(OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE), | ||
450 | OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), | ||
451 | NULL, NULL); | ||
429 | omap3xxx_check_revision(); | 452 | omap3xxx_check_revision(); |
430 | omap3xxx_check_features(); | 453 | omap3xxx_check_features(); |
431 | omap_common_init_early(); | 454 | omap_common_init_early(); |
@@ -459,7 +482,13 @@ void __init am35xx_init_early(void) | |||
459 | 482 | ||
460 | void __init ti81xx_init_early(void) | 483 | void __init ti81xx_init_early(void) |
461 | { | 484 | { |
462 | omap2_set_globals_ti81xx(); | 485 | omap2_set_globals_tap(OMAP343X_CLASS, |
486 | OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE)); | ||
487 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(TI81XX_CTRL_BASE), | ||
488 | NULL); | ||
489 | omap2_set_globals_prcm(OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE), | ||
490 | OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE), | ||
491 | NULL, NULL); | ||
463 | omap3xxx_check_revision(); | 492 | omap3xxx_check_revision(); |
464 | ti81xx_check_features(); | 493 | ti81xx_check_features(); |
465 | omap_common_init_early(); | 494 | omap_common_init_early(); |
@@ -517,7 +546,13 @@ void __init ti81xx_init_late(void) | |||
517 | #ifdef CONFIG_SOC_AM33XX | 546 | #ifdef CONFIG_SOC_AM33XX |
518 | void __init am33xx_init_early(void) | 547 | void __init am33xx_init_early(void) |
519 | { | 548 | { |
520 | omap2_set_globals_am33xx(); | 549 | omap2_set_globals_tap(AM335X_CLASS, |
550 | AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE)); | ||
551 | omap2_set_globals_control(AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE), | ||
552 | NULL); | ||
553 | omap2_set_globals_prcm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), | ||
554 | AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), | ||
555 | NULL, NULL); | ||
521 | omap3xxx_check_revision(); | 556 | omap3xxx_check_revision(); |
522 | ti81xx_check_features(); | 557 | ti81xx_check_features(); |
523 | omap_common_init_early(); | 558 | omap_common_init_early(); |
@@ -533,7 +568,14 @@ void __init am33xx_init_early(void) | |||
533 | #ifdef CONFIG_ARCH_OMAP4 | 568 | #ifdef CONFIG_ARCH_OMAP4 |
534 | void __init omap4430_init_early(void) | 569 | void __init omap4430_init_early(void) |
535 | { | 570 | { |
536 | omap2_set_globals_443x(); | 571 | omap2_set_globals_tap(OMAP443X_CLASS, |
572 | OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); | ||
573 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), | ||
574 | OMAP2_L4_IO_ADDRESS(OMAP443X_CTRL_BASE)); | ||
575 | omap2_set_globals_prcm(OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), | ||
576 | OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), | ||
577 | OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE), | ||
578 | OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE)); | ||
537 | omap4xxx_check_revision(); | 579 | omap4xxx_check_revision(); |
538 | omap4xxx_check_features(); | 580 | omap4xxx_check_features(); |
539 | omap_common_init_early(); | 581 | omap_common_init_early(); |
@@ -556,7 +598,14 @@ void __init omap4430_init_late(void) | |||
556 | #ifdef CONFIG_SOC_OMAP5 | 598 | #ifdef CONFIG_SOC_OMAP5 |
557 | void __init omap5_init_early(void) | 599 | void __init omap5_init_early(void) |
558 | { | 600 | { |
559 | omap2_set_globals_5xxx(); | 601 | omap2_set_globals_tap(OMAP54XX_CLASS, |
602 | OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); | ||
603 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE), | ||
604 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CTRL_BASE)); | ||
605 | omap2_set_globals_prcm(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE), | ||
606 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_AON_BASE), | ||
607 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE), | ||
608 | OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); | ||
560 | omap5xxx_check_revision(); | 609 | omap5xxx_check_revision(); |
561 | omap_common_init_early(); | 610 | omap_common_init_early(); |
562 | } | 611 | } |