omap2+: Minimize board specific init_early calls
authorTony Lindgren <tony@atomide.com>
Thu, 24 Feb 2011 22:36:03 +0000 (14:36 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 25 Feb 2011 18:19:21 +0000 (10:19 -0800)
We should only call init_common_infrastructure and
init_common_devices from init_early.

Signed-off-by: Tony Lindgren <tony@atomide.com>
18 files changed:
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-3630sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517crane.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-ti8168evm.c

index cc42d474c443fd8ebbfb2ac18b2ed077fc4b58ed..59de1dc5d6b41c377a7872b654cf800ed848175d 100644 (file)
@@ -142,8 +142,6 @@ static struct omap_board_config_kernel sdp2430_config[] __initdata = {
 
 static void __init omap_2430sdp_init_early(void)
 {
-       omap_board_config = sdp2430_config;
-       omap_board_config_size = ARRAY_SIZE(sdp2430_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -246,6 +244,9 @@ static void __init omap_2430sdp_init(void)
 
        omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
 
+       omap_board_config = sdp2430_config;
+       omap_board_config_size = ARRAY_SIZE(sdp2430_config);
+
        omap2430_i2c_init();
 
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
index 8950ecc9b9403220efa8e27858062971023f2ed5..b12b62064e7c8882931e1b6a096c478f5ee5cc53 100644 (file)
@@ -315,9 +315,6 @@ static struct omap_board_config_kernel sdp3430_config[] __initdata = {
 
 static void __init omap_3430sdp_init_early(void)
 {
-       omap_board_config = sdp3430_config;
-       omap_board_config_size = ARRAY_SIZE(sdp3430_config);
-       omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
 }
@@ -788,6 +785,9 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init omap_3430sdp_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = sdp3430_config;
+       omap_board_config_size = ARRAY_SIZE(sdp3430_config);
+       omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
        omap3430_i2c_init();
        omap_display_init(&sdp3430_dss_data);
        if (omap_rev() > OMAP3430_REV_ES1_0)
index 8d1c4358ecf9388e71e7b87e5ae01f850e4ff0a6..c4e22b32e47fa07085fc04f89484aa55848dab26 100644 (file)
@@ -72,8 +72,6 @@ static struct omap_board_config_kernel sdp_config[] __initdata = {
 
 static void __init omap_sdp_init_early(void)
 {
-       omap_board_config = sdp_config;
-       omap_board_config_size = ARRAY_SIZE(sdp_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
                                  h8mbx00u0mer0em_sdrc_params);
@@ -206,6 +204,8 @@ static struct flash_partitions sdp_flash_partitions[] = {
 static void __init omap_sdp_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
+       omap_board_config = sdp_config;
+       omap_board_config_size = ARRAY_SIZE(sdp_config);
        zoom_peripherals_init();
        zoom_display_init();
        board_smc91x_init();
index 1a943be822c3f431a6aa53da6b31405b4874821f..81ef97961eda85977d85e93420ed044ed9224dda 100644 (file)
@@ -325,8 +325,6 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = {
 
 static void __init omap_4430sdp_init_early(void)
 {
-       omap_board_config = sdp4430_config;
-       omap_board_config_size = ARRAY_SIZE(sdp4430_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 #ifdef CONFIG_OMAP_32K_TIMER
@@ -640,6 +638,9 @@ static void __init omap_4430sdp_init(void)
                package = OMAP_PACKAGE_CBL;
        omap4_mux_init(board_mux, package);
 
+       omap_board_config = sdp4430_config;
+       omap_board_config_size = ARRAY_SIZE(sdp4430_config);
+
        omap4_i2c_init();
        omap_sfh7741prox_init();
        platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
index ae3a83d47dab241de1e73ec022cfe1e67bc75f46..f53bbb2c34787005631fd9827462005a915f5a58 100644 (file)
@@ -51,9 +51,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 static void __init am3517_crane_init_early(void)
 {
-       omap_board_config = am3517_crane_config;
-       omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
-
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -76,6 +73,9 @@ static void __init am3517_crane_init(void)
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
 
+       omap_board_config = am3517_crane_config;
+       omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
+
        /* Configure GPIO for EHCI port */
        if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {
                pr_err("Can not configure mux for GPIO_USB_NRESET %d\n",
index 634fe65b33c8b567d909f78cf5d3a9a291e00203..30ec4519326862f5dfbc39338e55f926ec823ac6 100644 (file)
@@ -381,13 +381,8 @@ static struct omap_dss_board_info am3517_evm_dss_data = {
 /*
  * Board initialization
  */
-static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
-};
-
 static void __init am3517_evm_init_early(void)
 {
-       omap_board_config = am3517_evm_config;
-       omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -481,8 +476,13 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata)
        platform_device_register(&am3517_hecc_device);
 }
 
+static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
+};
+
 static void __init am3517_evm_init(void)
 {
+       omap_board_config = am3517_evm_config;
+       omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
        am3517_evm_i2c_init();
index 4ef4aad4e719d52e85d49a9bfe780f430a0b6fe2..f4f8374a02982d59b3bf4f1527834e15eabbc23b 100644 (file)
@@ -276,8 +276,6 @@ static struct omap_board_config_kernel apollon_config[] __initdata = {
 
 static void __init omap_apollon_init_early(void)
 {
-       omap_board_config = apollon_config;
-       omap_board_config_size = ARRAY_SIZE(apollon_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -319,6 +317,8 @@ static void __init omap_apollon_init(void)
        u32 v;
 
        omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
+       omap_board_config = apollon_config;
+       omap_board_config_size = ARRAY_SIZE(apollon_config);
 
        apollon_init_smc91x();
        apollon_led_init();
index 7311824be993d8838166955e15a89ecceabf024d..27bea540ccbb9a679bd6b079dcb88adb2c6fb54f 100644 (file)
@@ -668,14 +668,8 @@ static void __init cm_t35_init_i2c(void)
                              ARRAY_SIZE(cm_t35_i2c_boardinfo));
 }
 
-static struct omap_board_config_kernel cm_t35_config[] __initdata = {
-};
-
 static void __init cm_t35_init_early(void)
 {
-       omap_board_config = cm_t35_config;
-       omap_board_config_size = ARRAY_SIZE(cm_t35_config);
-
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                             mt46h32m32lf6_sdrc_params);
@@ -785,8 +779,13 @@ static struct omap_musb_board_data musb_board_data = {
        .power                  = 100,
 };
 
+static struct omap_board_config_kernel cm_t35_config[] __initdata = {
+};
+
 static void __init cm_t35_init(void)
 {
+       omap_board_config = cm_t35_config;
+       omap_board_config_size = ARRAY_SIZE(cm_t35_config);
        omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
        omap_serial_init();
        cm_t35_init_i2c();
index 38bef6d004c962cb7813ea0fbc794a8ba7889d0a..9da6e8240e8bee9c1bd376d1ef2c2db5083bbbca 100644 (file)
@@ -256,9 +256,6 @@ static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
 
 static void __init cm_t3517_init_early(void)
 {
-       omap_board_config = cm_t3517_config;
-       omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
-
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -293,6 +290,8 @@ static void __init cm_t3517_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
+       omap_board_config = cm_t3517_config;
+       omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
        cm_t3517_init_leds();
        cm_t3517_init_nand();
        cm_t3517_init_rtc();
index 682da9251db6d330969f244b2a8782cf0428911d..73e3c31e85080bf619862c04aae235fe35ec2618 100644 (file)
@@ -35,8 +35,6 @@ static struct omap_board_config_kernel generic_config[] = {
 
 static void __init omap_generic_init_early(void)
 {
-       omap_board_config = generic_config;
-       omap_board_config_size = ARRAY_SIZE(generic_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -44,6 +42,8 @@ static void __init omap_generic_init_early(void)
 static void __init omap_generic_init(void)
 {
        omap_serial_init();
+       omap_board_config = generic_config;
+       omap_board_config_size = ARRAY_SIZE(generic_config);
 }
 
 static void __init omap_generic_map_io(void)
index f6a3872f72fa07f29faf32db4690dcfe9efb1f02..7e6bf4fa15355b730e33570da97b4dceb489e250 100644 (file)
@@ -292,8 +292,6 @@ static struct omap_board_config_kernel h4_config[] __initdata = {
 
 static void __init omap_h4_init_early(void)
 {
-       omap_board_config = h4_config;
-       omap_board_config_size = ARRAY_SIZE(h4_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -334,6 +332,9 @@ static void __init omap_h4_init(void)
 {
        omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
 
+       omap_board_config = h4_config;
+       omap_board_config_size = ARRAY_SIZE(h4_config);
+
        /*
         * Make sure the serial ports are muxed on at this point.
         * You have to mux them off in device drivers later on
index a3fae5697a72b8aba7aed7d85cf60786f952b4c5..a69e59455eed7e2b1c450e0bb59154e3a73e0865 100644 (file)
@@ -290,8 +290,6 @@ static struct omap_board_config_kernel ldp_config[] __initdata = {
 
 static void __init omap_ldp_init_early(void)
 {
-       omap_board_config = ldp_config;
-       omap_board_config_size = ARRAY_SIZE(ldp_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -422,6 +420,8 @@ static struct mtd_partition ldp_nand_partitions[] = {
 static void __init omap_ldp_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = ldp_config;
+       omap_board_config_size = ARRAY_SIZE(ldp_config);
        ldp_init_smsc911x();
        omap_i2c_init();
        platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
index 5364147892c1dc361d8a6862f52718809179f0ba..3d9b58a53c9775a78329493f928fbba08d91c3e0 100644 (file)
@@ -732,8 +732,6 @@ static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
 
 static void __init omap3_evm_init_early(void)
 {
-       omap_board_config = omap3_evm_config;
-       omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
 }
@@ -824,6 +822,9 @@ static void __init omap3_evm_init(void)
        else
                omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
 
+       omap_board_config = omap3_evm_config;
+       omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
+
        omap3_evm_i2c_init();
 
        omap_display_init(&omap3_evm_dss_data);
index 07006c323fc2bd22d34112db8070f0722893adf2..fd8b7649b149b72feebf91149b6f4d244e8e0d7c 100644 (file)
@@ -581,8 +581,6 @@ static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
 
 static void __init omap3_stalker_init_early(void)
 {
-       omap_board_config = omap3_stalker_config;
-       omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
 }
@@ -629,6 +627,8 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init omap3_stalker_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
+       omap_board_config = omap3_stalker_config;
+       omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
 
        omap3_stalker_i2c_init();
 
index a35afe2227d3633ac0f4da7c7707b03314fd1e00..8e2a7ba4153b523e75ec88f79427136255464eca 100644 (file)
@@ -417,8 +417,6 @@ static struct omap_board_mux board_mux[] __initdata = {
 
 static void __init omap3_touchbook_init_early(void)
 {
-       omap_board_config = omap3_touchbook_config;
-       omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
@@ -514,6 +512,9 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init omap3_touchbook_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = omap3_touchbook_config;
+       omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
+
        pm_power_off = omap3_touchbook_poweroff;
 
        omap3_touchbook_i2c_init();
index a33ec0edec134c79a42df19abbfe60f083bb37d6..d480ddb3952c6107b524120a83415671a2345753 100644 (file)
@@ -411,8 +411,6 @@ static struct omap_board_config_kernel overo_config[] __initdata = {
 
 static void __init overo_init_early(void)
 {
-       omap_board_config = overo_config;
-       omap_board_config_size = ARRAY_SIZE(overo_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
@@ -448,6 +446,8 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init overo_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = overo_config;
+       omap_board_config_size = ARRAY_SIZE(overo_config);
        overo_i2c_init();
        platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
        omap_serial_init();
index 3cf72fe6d75bb5611fe1f6b9398e869bc2999a0b..e964895b80e8f95bbf8544a840e4598062c96a88 100644 (file)
@@ -102,9 +102,6 @@ static void __init rx51_init_early(void)
 {
        struct omap_sdrc_params *sdrc_params;
 
-       omap_board_config = rx51_config;
-       omap_board_config_size = ARRAY_SIZE(rx51_config);
-       omap3_pm_init_cpuidle(rx51_cpuidle_params);
        omap2_init_common_infrastructure();
        sdrc_params = nokia_get_sdram_timings();
        omap2_init_common_devices(sdrc_params, sdrc_params);
@@ -127,6 +124,9 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init rx51_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = rx51_config;
+       omap_board_config_size = ARRAY_SIZE(rx51_config);
+       omap3_pm_init_cpuidle(rx51_cpuidle_params);
        omap_serial_init();
        usb_musb_init(&musb_board_data);
        rx51_peripherals_init();
index f2b097190e07086c964690443d2842e9fe657e4e..09fa7bfff8d6b2a75a170caab975e1f08b29b93f 100644 (file)
@@ -29,8 +29,6 @@ static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
 
 static void __init ti8168_init_early(void)
 {
-       omap_board_config = ti8168_evm_config;
-       omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 }
@@ -43,6 +41,8 @@ static void __init ti8168_evm_init_irq(void)
 static void __init ti8168_evm_init(void)
 {
        omap_serial_init();
+       omap_board_config = ti8168_evm_config;
+       omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
 }
 
 static void __init ti8168_evm_map_io(void)