Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
[pandora-kernel.git] / arch / arm / mach-omap2 / board-4430sdp.c
index 73fa90b..933b25b 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "mux.h"
 #include "hsmmc.h"
-#include "timer-gp.h"
 #include "control.h"
 #include "common-board-devices.h"
 
@@ -258,7 +257,7 @@ static struct gpio sdp4430_eth_gpios[] __initdata = {
        { ETH_KS8851_IRQ,       GPIOF_IN,               "eth_irq"       },
 };
 
-static int omap_ethernet_init(void)
+static int __init omap_ethernet_init(void)
 {
        int status;
 
@@ -295,9 +294,6 @@ static void __init omap_4430sdp_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-#ifdef CONFIG_OMAP_32K_TIMER
-       omap2_gp_clockevent_set_gptimer(1);
-#endif
 }
 
 static struct omap_musb_board_data musb_board_data = {
@@ -306,14 +302,6 @@ static struct omap_musb_board_data musb_board_data = {
        .power                  = 100,
 };
 
-static struct twl4030_usb_data omap4_usbphy_data = {
-       .phy_init       = omap4430_phy_init,
-       .phy_exit       = omap4430_phy_exit,
-       .phy_power      = omap4430_phy_power,
-       .phy_set_clock  = omap4430_phy_set_clk,
-       .phy_suspend    = omap4430_phy_suspend,
-};
-
 static struct omap2_hsmmc_info mmc[] = {
        {
                .mmc            = 2,
@@ -322,6 +310,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .gpio_wp        = -EINVAL,
                .nonremovable   = true,
                .ocr_mask       = MMC_VDD_29_30,
+               .no_off_init    = true,
        },
        {
                .mmc            = 1,
@@ -332,16 +321,7 @@ static struct omap2_hsmmc_info mmc[] = {
 };
 
 static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
-       {
-               .supply = "vmmc",
-               .dev_name = "omap_hsmmc.1",
-       },
-};
-static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
-       {
-               .supply = "vmmc",
-               .dev_name = "omap_hsmmc.0",
-       },
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
@@ -398,65 +378,10 @@ static struct regulator_init_data sdp4430_vaux1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
+       .num_consumer_supplies  = ARRAY_SIZE(sdp4430_vaux_supply),
        .consumer_supplies      = sdp4430_vaux_supply,
 };
 
-static struct regulator_init_data sdp4430_vaux2 = {
-       .constraints = {
-               .min_uV                 = 1200000,
-               .max_uV                 = 2800000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vaux3 = {
-       .constraints = {
-               .min_uV                 = 1000000,
-               .max_uV                 = 3000000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-/* VMMC1 for MMC1 card */
-static struct regulator_init_data sdp4430_vmmc = {
-       .constraints = {
-               .min_uV                 = 1200000,
-               .max_uV                 = 3000000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = sdp4430_vmmc_supply,
-};
-
-static struct regulator_init_data sdp4430_vpp = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 2500000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_VOLTAGE
-                                       | REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
 static struct regulator_init_data sdp4430_vusim = {
        .constraints = {
                .min_uV                 = 1200000,
@@ -470,74 +395,10 @@ static struct regulator_init_data sdp4430_vusim = {
        },
 };
 
-static struct regulator_init_data sdp4430_vana = {
-       .constraints = {
-               .min_uV                 = 2100000,
-               .max_uV                 = 2100000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vcxio = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vdac = {
-       .constraints = {
-               .min_uV                 = 1800000,
-               .max_uV                 = 1800000,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  = REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_vusb = {
-       .constraints = {
-               .min_uV                 = 3300000,
-               .max_uV                 = 3300000,
-               .apply_uV               = true,
-               .valid_modes_mask       = REGULATOR_MODE_NORMAL
-                                       | REGULATOR_MODE_STANDBY,
-               .valid_ops_mask  =      REGULATOR_CHANGE_MODE
-                                       | REGULATOR_CHANGE_STATUS,
-       },
-};
-
-static struct regulator_init_data sdp4430_clk32kg = {
-       .constraints = {
-               .valid_ops_mask         = REGULATOR_CHANGE_STATUS,
-       },
-};
-
 static struct twl4030_platform_data sdp4430_twldata = {
-       .irq_base       = TWL6030_IRQ_BASE,
-       .irq_end        = TWL6030_IRQ_END,
-
        /* Regulators */
-       .vmmc           = &sdp4430_vmmc,
-       .vpp            = &sdp4430_vpp,
        .vusim          = &sdp4430_vusim,
-       .vana           = &sdp4430_vana,
-       .vcxio          = &sdp4430_vcxio,
-       .vdac           = &sdp4430_vdac,
-       .vusb           = &sdp4430_vusb,
        .vaux1          = &sdp4430_vaux1,
-       .vaux2          = &sdp4430_vaux2,
-       .vaux3          = &sdp4430_vaux3,
-       .clk32kg        = &sdp4430_clk32kg,
-       .usb            = &omap4_usbphy_data
 };
 
 static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
@@ -555,6 +416,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
 };
 static int __init omap4_i2c_init(void)
 {
+       omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
+                       TWL_COMMON_REGULATOR_VDAC |
+                       TWL_COMMON_REGULATOR_VAUX2 |
+                       TWL_COMMON_REGULATOR_VAUX3 |
+                       TWL_COMMON_REGULATOR_VMMC |
+                       TWL_COMMON_REGULATOR_VPP |
+                       TWL_COMMON_REGULATOR_VANA |
+                       TWL_COMMON_REGULATOR_VCXIO |
+                       TWL_COMMON_REGULATOR_VUSB |
+                       TWL_COMMON_REGULATOR_CLK32KG);
        omap4_pmic_init("twl6030", &sdp4430_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
        omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
@@ -681,19 +552,19 @@ static struct omap_device_pad serial4_pads[] __initdata = {
                         OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
 };
 
-static struct omap_board_data serial2_data = {
+static struct omap_board_data serial2_data __initdata = {
        .id             = 1,
        .pads           = serial2_pads,
        .pads_cnt       = ARRAY_SIZE(serial2_pads),
 };
 
-static struct omap_board_data serial3_data = {
+static struct omap_board_data serial3_data __initdata = {
        .id             = 2,
        .pads           = serial3_pads,
        .pads_cnt       = ARRAY_SIZE(serial3_pads),
 };
 
-static struct omap_board_data serial4_data = {
+static struct omap_board_data serial4_data __initdata = {
        .id             = 3,
        .pads           = serial4_pads,
        .pads_cnt       = ARRAY_SIZE(serial4_pads),
@@ -729,7 +600,7 @@ static void __init omap_4430sdp_init(void)
 
        if (omap_rev() == OMAP4430_REV_ES1_0)
                package = OMAP_PACKAGE_CBL;
-       omap4_mux_init(board_mux, package);
+       omap4_mux_init(board_mux, NULL, package);
 
        omap_board_config = sdp4430_config;
        omap_board_config_size = ARRAY_SIZE(sdp4430_config);
@@ -772,5 +643,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
        .init_early     = omap_4430sdp_init_early,
        .init_irq       = gic_init_irq,
        .init_machine   = omap_4430sdp_init,
-       .timer          = &omap_timer,
+       .timer          = &omap4_timer,
 MACHINE_END