Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
[pandora-kernel.git] / arch / arm / mach-imx / mach-mx27_3ds.c
index ba88417..6e1accf 100644 (file)
@@ -98,6 +98,9 @@ static const int mx27pdk_pins[] __initconst = {
        PD22_PF_CSPI2_SCLK,
        PD23_PF_CSPI2_MISO,
        PD24_PF_CSPI2_MOSI,
+       /* I2C1 */
+       PD17_PF_I2C_DATA,
+       PD18_PF_I2C_CLK,
 };
 
 static const struct imxuart_platform_data uart_pdata __initconst = {
@@ -159,7 +162,6 @@ static int otg_phy_init(void)
        return 0;
 }
 
-#if defined(CONFIG_USB_ULPI)
 static int mx27_3ds_otg_init(struct platform_device *pdev)
 {
        return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
@@ -169,7 +171,6 @@ static struct mxc_usbh_platform_data otg_pdata __initdata = {
        .init   = mx27_3ds_otg_init,
        .portsc = MXC_EHCI_MODE_ULPI,
 };
-#endif
 
 static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
@@ -231,10 +232,13 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = {
 };
 
 /* MC13783 */
-static struct mc13xxx_platform_data mc13783_pdata __initdata = {
-       .regulators = mx27_3ds_regulators,
-       .num_regulators = ARRAY_SIZE(mx27_3ds_regulators),
-       .flags  = MC13XXX_USE_REGULATOR,
+static struct mc13xxx_platform_data mc13783_pdata = {
+       .regulators = {
+               .regulators = mx27_3ds_regulators,
+               .num_regulators = ARRAY_SIZE(mx27_3ds_regulators),
+
+       },
+       .flags  = MC13783_USE_REGULATOR,
 };
 
 /* SPI */
@@ -257,6 +261,9 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
        },
 };
 
+static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = {
+       .bitrate = 100000,
+};
 
 static void __init mx27pdk_init(void)
 {
@@ -269,14 +276,15 @@ static void __init mx27pdk_init(void)
        imx27_add_mxc_mmc(0, &sdhc1_pdata);
        imx27_add_imx2_wdt(NULL);
        otg_phy_init();
-#if defined(CONFIG_USB_ULPI)
+
        if (otg_mode_host) {
-               otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
-                               ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+               otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
+                               ULPI_OTG_DRVVBUS_EXT);
 
-               imx27_add_mxc_ehci_otg(&otg_pdata);
+               if (otg_pdata.otg)
+                       imx27_add_mxc_ehci_otg(&otg_pdata);
        }
-#endif
+
        if (!otg_mode_host)
                imx27_add_fsl_usb2_udc(&otg_device_pdata);
 
@@ -286,6 +294,7 @@ static void __init mx27pdk_init(void)
 
        if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT))
                pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n");
+       imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data);
 }
 
 static void __init mx27pdk_timer_init(void)