aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-21 17:25:10 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 21:55:11 -0500
commit4805734bcc5a6b28b527a13a5c1603a2912c9f48 (patch)
treee2f43f70814ef3bac279bedc511526149864c7fc /arch/arm
parentb9e7683bbca638967a56e5d7fd4035a947109621 (diff)
OMAP2+: io: split omap2_init_common_hw()
Split omap2_init_common_hw() into two functions. The first, omap2_init_common_infrastructure(), initializes the hwmod code and data, the OMAP PM code, and the clock code and data. The second, omap2_init_common_devices(), handles any other early device initialization that, for whatever reason, has not been or cannot be moved to initcalls or early platform devices. This patch is required for the hwmod postsetup patch, which allows board files to change the state that hwmods should be placed into at the conclusion of the hwmod _setup() function. For example, for a board whose creators wish to ensure watchdog coverage across the entire kernel boot process, code to change the watchdog's postsetup state will be added in the board-*.c file between the omap2_init_common_infrastructure() and omap2_init_common_devices() function calls. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c3
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c3
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c5
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c3
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c3
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c4
-rw-r--r--arch/arm/mach-omap2/board-apollon.c3
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c3
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c3
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c5
-rw-r--r--arch/arm/mach-omap2/board-generic.c3
-rw-r--r--arch/arm/mach-omap2/board-h4.c3
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c4
-rw-r--r--arch/arm/mach-omap2/board-igep0030.c4
-rw-r--r--arch/arm/mach-omap2/board-ldp.c3
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c3
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c5
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c3
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c3
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c5
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c3
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c5
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c3
-rw-r--r--arch/arm/mach-omap2/board-overo.c5
-rw-r--r--arch/arm/mach-omap2/board-rm680.c3
-rw-r--r--arch/arm/mach-omap2/board-rx51.c3
-rw-r--r--arch/arm/mach-omap2/board-zoom.c9
-rw-r--r--arch/arm/mach-omap2/io.c16
-rw-r--r--arch/arm/plat-omap/include/plat/io.h5
29 files changed, 80 insertions, 43 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index e9eee5f0e6d3..e0661777f599 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -143,7 +143,8 @@ static void __init omap_2430sdp_init_irq(void)
143{ 143{
144 omap_board_config = sdp2430_config; 144 omap_board_config = sdp2430_config;
145 omap_board_config_size = ARRAY_SIZE(sdp2430_config); 145 omap_board_config_size = ARRAY_SIZE(sdp2430_config);
146 omap2_init_common_hw(NULL, NULL); 146 omap2_init_common_infrastructure();
147 omap2_init_common_devices(NULL, NULL);
147 omap_init_irq(); 148 omap_init_irq();
148} 149}
149 150
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 869fb133c207..3b39ef1a680a 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -326,7 +326,8 @@ static void __init omap_3430sdp_init_irq(void)
326 omap_board_config = sdp3430_config; 326 omap_board_config = sdp3430_config;
327 omap_board_config_size = ARRAY_SIZE(sdp3430_config); 327 omap_board_config_size = ARRAY_SIZE(sdp3430_config);
328 omap3_pm_init_cpuidle(omap3_cpuidle_params_table); 328 omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
329 omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL); 329 omap2_init_common_infrastructure();
330 omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
330 omap_init_irq(); 331 omap_init_irq();
331} 332}
332 333
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index a8d35ba7781e..5d41dbe059a3 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -73,8 +73,9 @@ static void __init omap_sdp_init_irq(void)
73{ 73{
74 omap_board_config = sdp_config; 74 omap_board_config = sdp_config;
75 omap_board_config_size = ARRAY_SIZE(sdp_config); 75 omap_board_config_size = ARRAY_SIZE(sdp_config);
76 omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params, 76 omap2_init_common_infrastructure();
77 h8mbx00u0mer0em_sdrc_params); 77 omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
78 h8mbx00u0mer0em_sdrc_params);
78 omap_init_irq(); 79 omap_init_irq();
79} 80}
80 81
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 33b1f7319c17..1cb208b6e626 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -242,7 +242,8 @@ static void __init omap_4430sdp_init_irq(void)
242{ 242{
243 omap_board_config = sdp4430_config; 243 omap_board_config = sdp4430_config;
244 omap_board_config_size = ARRAY_SIZE(sdp4430_config); 244 omap_board_config_size = ARRAY_SIZE(sdp4430_config);
245 omap2_init_common_hw(NULL, NULL); 245 omap2_init_common_infrastructure();
246 omap2_init_common_devices(NULL, NULL);
246#ifdef CONFIG_OMAP_32K_TIMER 247#ifdef CONFIG_OMAP_32K_TIMER
247 omap2_gp_clockevent_set_gptimer(1); 248 omap2_gp_clockevent_set_gptimer(1);
248#endif 249#endif
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 8ba404770e75..781ed2558e12 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -47,7 +47,8 @@ static void __init am3517_crane_init_irq(void)
47 omap_board_config = am3517_crane_config; 47 omap_board_config = am3517_crane_config;
48 omap_board_config_size = ARRAY_SIZE(am3517_crane_config); 48 omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
49 49
50 omap2_init_common_hw(NULL, NULL); 50 omap2_init_common_infrastructure();
51 omap2_init_common_devices(NULL, NULL);
51 omap_init_irq(); 52 omap_init_irq();
52} 53}
53 54
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 86867138f1e4..bc1562648020 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -389,8 +389,8 @@ static void __init am3517_evm_init_irq(void)
389{ 389{
390 omap_board_config = am3517_evm_config; 390 omap_board_config = am3517_evm_config;
391 omap_board_config_size = ARRAY_SIZE(am3517_evm_config); 391 omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
392 392 omap2_init_common_infrastructure();
393 omap2_init_common_hw(NULL, NULL); 393 omap2_init_common_devices(NULL, NULL);
394 omap_init_irq(); 394 omap_init_irq();
395} 395}
396 396
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 200cb386340b..9f55b68687f7 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -278,7 +278,8 @@ static void __init omap_apollon_init_irq(void)
278{ 278{
279 omap_board_config = apollon_config; 279 omap_board_config = apollon_config;
280 omap_board_config_size = ARRAY_SIZE(apollon_config); 280 omap_board_config_size = ARRAY_SIZE(apollon_config);
281 omap2_init_common_hw(NULL, NULL); 281 omap2_init_common_infrastructure();
282 omap2_init_common_devices(NULL, NULL);
282 omap_init_irq(); 283 omap_init_irq();
283} 284}
284 285
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 22c55d13a4e3..486a3de5f401 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -677,7 +677,8 @@ static void __init cm_t35_init_irq(void)
677 omap_board_config = cm_t35_config; 677 omap_board_config = cm_t35_config;
678 omap_board_config_size = ARRAY_SIZE(cm_t35_config); 678 omap_board_config_size = ARRAY_SIZE(cm_t35_config);
679 679
680 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 680 omap2_init_common_infrastructure();
681 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
681 mt46h32m32lf6_sdrc_params); 682 mt46h32m32lf6_sdrc_params);
682 omap_init_irq(); 683 omap_init_irq();
683} 684}
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 7ee23dab84fe..5b0c77732dfc 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -248,7 +248,8 @@ static void __init cm_t3517_init_irq(void)
248 omap_board_config = cm_t3517_config; 248 omap_board_config = cm_t3517_config;
249 omap_board_config_size = ARRAY_SIZE(cm_t3517_config); 249 omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
250 250
251 omap2_init_common_hw(NULL, NULL); 251 omap2_init_common_infrastructure();
252 omap2_init_common_devices(NULL, NULL);
252 omap_init_irq(); 253 omap_init_irq();
253} 254}
254 255
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index a30a7fce8cbf..924b7cf93a4b 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -444,8 +444,9 @@ static struct platform_device keys_gpio = {
444 444
445static void __init devkit8000_init_irq(void) 445static void __init devkit8000_init_irq(void)
446{ 446{
447 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 447 omap2_init_common_infrastructure();
448 mt46h32m32lf6_sdrc_params); 448 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
449 mt46h32m32lf6_sdrc_params);
449 omap_init_irq(); 450 omap_init_irq();
450#ifdef CONFIG_OMAP_32K_TIMER 451#ifdef CONFIG_OMAP_32K_TIMER
451 omap2_gp_clockevent_set_gptimer(12); 452 omap2_gp_clockevent_set_gptimer(12);
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index b1c2c9a11c38..0e3d81e09f89 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -37,7 +37,8 @@ static void __init omap_generic_init_irq(void)
37{ 37{
38 omap_board_config = generic_config; 38 omap_board_config = generic_config;
39 omap_board_config_size = ARRAY_SIZE(generic_config); 39 omap_board_config_size = ARRAY_SIZE(generic_config);
40 omap2_init_common_hw(NULL, NULL); 40 omap2_init_common_infrastructure();
41 omap2_init_common_devices(NULL, NULL);
41 omap_init_irq(); 42 omap_init_irq();
42} 43}
43 44
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 0a2d73cf036f..db5d323866f4 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -291,7 +291,8 @@ static void __init omap_h4_init_irq(void)
291{ 291{
292 omap_board_config = h4_config; 292 omap_board_config = h4_config;
293 omap_board_config_size = ARRAY_SIZE(h4_config); 293 omap_board_config_size = ARRAY_SIZE(h4_config);
294 omap2_init_common_hw(NULL, NULL); 294 omap2_init_common_infrastructure();
295 omap2_init_common_devices(NULL, NULL);
295 omap_init_irq(); 296 omap_init_irq();
296 h4_init_flash(); 297 h4_init_flash();
297} 298}
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index c5bd537553c2..0afa3011db0f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -520,7 +520,9 @@ static struct platform_device *igep2_devices[] __initdata = {
520 520
521static void __init igep2_init_irq(void) 521static void __init igep2_init_irq(void)
522{ 522{
523 omap2_init_common_hw(m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params); 523 omap2_init_common_infrastructure();
524 omap2_init_common_devices(m65kxxxxam_sdrc_params,
525 m65kxxxxam_sdrc_params);
524 omap_init_irq(); 526 omap_init_irq();
525} 527}
526 528
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c
index 886f193a8415..bcccd68f1856 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -289,7 +289,9 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = {
289 289
290static void __init igep3_init_irq(void) 290static void __init igep3_init_irq(void)
291{ 291{
292 omap2_init_common_hw(m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params); 292 omap2_init_common_infrastructure();
293 omap2_init_common_devices(m65kxxxxam_sdrc_params,
294 m65kxxxxam_sdrc_params);
293 omap_init_irq(); 295 omap_init_irq();
294} 296}
295 297
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 7455b0aadf86..e5dc74875f9d 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -292,7 +292,8 @@ static void __init omap_ldp_init_irq(void)
292{ 292{
293 omap_board_config = ldp_config; 293 omap_board_config = ldp_config;
294 omap_board_config_size = ARRAY_SIZE(ldp_config); 294 omap_board_config_size = ARRAY_SIZE(ldp_config);
295 omap2_init_common_hw(NULL, NULL); 295 omap2_init_common_infrastructure();
296 omap2_init_common_devices(NULL, NULL);
296 omap_init_irq(); 297 omap_init_irq();
297} 298}
298 299
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index d4ce96316e3b..43af70ec771e 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -631,7 +631,8 @@ static void __init n8x0_map_io(void)
631 631
632static void __init n8x0_init_irq(void) 632static void __init n8x0_init_irq(void)
633{ 633{
634 omap2_init_common_hw(NULL, NULL); 634 omap2_init_common_infrastructure();
635 omap2_init_common_devices(NULL, NULL);
635 omap_init_irq(); 636 omap_init_irq();
636} 637}
637 638
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index f1a8edefa42f..6c127605942f 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -484,8 +484,9 @@ static struct platform_device keys_gpio = {
484 484
485static void __init omap3_beagle_init_irq(void) 485static void __init omap3_beagle_init_irq(void)
486{ 486{
487 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 487 omap2_init_common_infrastructure();
488 mt46h32m32lf6_sdrc_params); 488 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
489 mt46h32m32lf6_sdrc_params);
489 omap_init_irq(); 490 omap_init_irq();
490#ifdef CONFIG_OMAP_32K_TIMER 491#ifdef CONFIG_OMAP_32K_TIMER
491 omap2_gp_clockevent_set_gptimer(12); 492 omap2_gp_clockevent_set_gptimer(12);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 21ffc5c587a1..3de8d9b8ec76 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -623,7 +623,8 @@ static void __init omap3_evm_init_irq(void)
623{ 623{
624 omap_board_config = omap3_evm_config; 624 omap_board_config = omap3_evm_config;
625 omap_board_config_size = ARRAY_SIZE(omap3_evm_config); 625 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
626 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL); 626 omap2_init_common_infrastructure();
627 omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
627 omap_init_irq(); 628 omap_init_irq();
628} 629}
629 630
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index cfd618d3bda8..15e4b08e99ba 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -197,7 +197,8 @@ static inline void __init board_smsc911x_init(void)
197 197
198static void __init omap3logic_init_irq(void) 198static void __init omap3logic_init_irq(void)
199{ 199{
200 omap2_init_common_hw(NULL, NULL); 200 omap2_init_common_infrastructure();
201 omap2_init_common_devices(NULL, NULL);
201 omap_init_irq(); 202 omap_init_irq();
202} 203}
203 204
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index e64bcb66d1ab..d457b5961f47 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -636,8 +636,9 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
636 636
637static void __init omap3pandora_init_irq(void) 637static void __init omap3pandora_init_irq(void)
638{ 638{
639 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 639 omap2_init_common_infrastructure();
640 mt46h32m32lf6_sdrc_params); 640 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
641 mt46h32m32lf6_sdrc_params);
641 omap_init_irq(); 642 omap_init_irq();
642} 643}
643 644
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 1af344b872bc..9df9d9367608 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -584,7 +584,8 @@ static void __init omap3_stalker_init_irq(void)
584{ 584{
585 omap_board_config = omap3_stalker_config; 585 omap_board_config = omap3_stalker_config;
586 omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); 586 omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
587 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL); 587 omap2_init_common_infrastructure();
588 omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
588 omap_init_irq(); 589 omap_init_irq();
589#ifdef CONFIG_OMAP_32K_TIMER 590#ifdef CONFIG_OMAP_32K_TIMER
590 omap2_gp_clockevent_set_gptimer(12); 591 omap2_gp_clockevent_set_gptimer(12);
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index baa72c507d4c..db1f74fe6c4f 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -420,8 +420,9 @@ static void __init omap3_touchbook_init_irq(void)
420 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 420 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
421 omap_board_config = omap3_touchbook_config; 421 omap_board_config = omap3_touchbook_config;
422 omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config); 422 omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
423 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 423 omap2_init_common_infrastructure();
424 mt46h32m32lf6_sdrc_params); 424 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
425 mt46h32m32lf6_sdrc_params);
425 omap_init_irq(); 426 omap_init_irq();
426#ifdef CONFIG_OMAP_32K_TIMER 427#ifdef CONFIG_OMAP_32K_TIMER
427 omap2_gp_clockevent_set_gptimer(12); 428 omap2_gp_clockevent_set_gptimer(12);
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index b82f2319a091..0d74f6cd5fae 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -77,7 +77,8 @@ static struct platform_device *panda_devices[] __initdata = {
77 77
78static void __init omap4_panda_init_irq(void) 78static void __init omap4_panda_init_irq(void)
79{ 79{
80 omap2_init_common_hw(NULL, NULL); 80 omap2_init_common_infrastructure();
81 omap2_init_common_devices(NULL, NULL);
81 gic_init_irq(); 82 gic_init_irq();
82} 83}
83 84
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index b75bdcd47117..cb26e5d8268d 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -413,8 +413,9 @@ static void __init overo_init_irq(void)
413{ 413{
414 omap_board_config = overo_config; 414 omap_board_config = overo_config;
415 omap_board_config_size = ARRAY_SIZE(overo_config); 415 omap_board_config_size = ARRAY_SIZE(overo_config);
416 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 416 omap2_init_common_infrastructure();
417 mt46h32m32lf6_sdrc_params); 417 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
418 mt46h32m32lf6_sdrc_params);
418 omap_init_irq(); 419 omap_init_irq();
419} 420}
420 421
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 8da65bd6ff8d..cb77be7ac44f 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -145,8 +145,9 @@ static void __init rm680_init_irq(void)
145{ 145{
146 struct omap_sdrc_params *sdrc_params; 146 struct omap_sdrc_params *sdrc_params;
147 147
148 omap2_init_common_infrastructure();
148 sdrc_params = nokia_get_sdram_timings(); 149 sdrc_params = nokia_get_sdram_timings();
149 omap2_init_common_hw(sdrc_params, sdrc_params); 150 omap2_init_common_devices(sdrc_params, sdrc_params);
150 omap_init_irq(); 151 omap_init_irq();
151} 152}
152 153
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 7362c91ddd76..f53fc551c58f 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -105,8 +105,9 @@ static void __init rx51_init_irq(void)
105 omap_board_config = rx51_config; 105 omap_board_config = rx51_config;
106 omap_board_config_size = ARRAY_SIZE(rx51_config); 106 omap_board_config_size = ARRAY_SIZE(rx51_config);
107 omap3_pm_init_cpuidle(rx51_cpuidle_params); 107 omap3_pm_init_cpuidle(rx51_cpuidle_params);
108 omap2_init_common_infrastructure();
108 sdrc_params = nokia_get_sdram_timings(); 109 sdrc_params = nokia_get_sdram_timings();
109 omap2_init_common_hw(sdrc_params, sdrc_params); 110 omap2_init_common_devices(sdrc_params, sdrc_params);
110 omap_init_irq(); 111 omap_init_irq();
111} 112}
112 113
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 0dff9deaa896..e041c537ea37 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -35,12 +35,13 @@
35 35
36static void __init omap_zoom_init_irq(void) 36static void __init omap_zoom_init_irq(void)
37{ 37{
38 omap2_init_common_infrastructure();
38 if (machine_is_omap_zoom2()) 39 if (machine_is_omap_zoom2())
39 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 40 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
40 mt46h32m32lf6_sdrc_params); 41 mt46h32m32lf6_sdrc_params);
41 else if (machine_is_omap_zoom3()) 42 else if (machine_is_omap_zoom3())
42 omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params, 43 omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
43 h8mbx00u0mer0em_sdrc_params); 44 h8mbx00u0mer0em_sdrc_params);
44 45
45 omap_init_irq(); 46 omap_init_irq();
46} 47}
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 5577ab2faad2..77bf0d1baeef 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -331,11 +331,8 @@ static inline void omap_irq_base_init(void)
331#endif 331#endif
332} 332}
333 333
334void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, 334void __init omap2_init_common_infrastructure(void)
335 struct omap_sdrc_params *sdrc_cs1)
336{ 335{
337 u8 skip_setup_idle = 0;
338
339 pwrdm_init(powerdomains_omap); 336 pwrdm_init(powerdomains_omap);
340 clkdm_init(clockdomains_omap, clkdm_autodeps); 337 clkdm_init(clockdomains_omap, clkdm_autodeps);
341 if (cpu_is_omap242x()) 338 if (cpu_is_omap242x())
@@ -359,6 +356,17 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
359 omap4xxx_clk_init(); 356 omap4xxx_clk_init();
360 else 357 else
361 pr_err("Could not init clock framework - unknown CPU\n"); 358 pr_err("Could not init clock framework - unknown CPU\n");
359}
360
361/*
362 * XXX Ideally, this function will dwindle into nothingness over time;
363 * almost all device init code should be possible through initcalls
364 * and other generalized mechanisms
365 */
366void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
367 struct omap_sdrc_params *sdrc_cs1)
368{
369 u8 skip_setup_idle = 0;
362 370
363 omap_serial_early_init(); 371 omap_serial_early_init();
364 372
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index 204865f91d93..ef4106c13183 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -291,8 +291,9 @@ static inline void omap44xx_map_common_io(void)
291} 291}
292#endif 292#endif
293 293
294extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, 294extern void omap2_init_common_infrastructure(void);
295 struct omap_sdrc_params *sdrc_cs1); 295extern void omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
296 struct omap_sdrc_params *sdrc_cs1);
296 297
297#define __arch_ioremap omap_ioremap 298#define __arch_ioremap omap_ioremap
298#define __arch_iounmap omap_iounmap 299#define __arch_iounmap omap_iounmap