Merge branch 'imx-for-2.6.38' of git://git.pengutronix.de/git/ukl/linux-2.6 into...
[pandora-kernel.git] / arch / arm / mach-mx3 / mx31moboard-smartbot.c
index 417757e..bbec3c8 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/types.h>
-#include <linux/fsl_devices.h>
 
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
@@ -28,7 +27,6 @@
 #include <mach/hardware.h>
 #include <mach/iomux-mx3.h>
 #include <mach/board-mx31moboard.h>
-#include <mach/mxc_ehci.h>
 #include <mach/ulpi.h>
 
 #include <media/soc_camera.h>
@@ -88,7 +86,6 @@ static struct soc_camera_link base_iclink = {
        .reset          = smartbot_cam_reset,
        .board_info     = &smartbot_i2c_devices[0],
        .i2c_adapter_id = 0,
-       .module_name    = "mt9t031",
 };
 
 static struct platform_device smartbot_camera[] = {
@@ -119,24 +116,30 @@ static int __init smartbot_cam_init(void)
        return 0;
 }
 
-static struct fsl_usb2_platform_data usb_pdata = {
+static const struct fsl_usb2_platform_data usb_pdata __initconst = {
        .operating_mode = FSL_USB2_DR_DEVICE,
        .phy_mode       = FSL_USB2_PHY_ULPI,
 };
 
 #if defined(CONFIG_USB_ULPI)
 
-static struct mxc_usbh_platform_data otg_host_pdata = {
+static struct mxc_usbh_platform_data otg_host_pdata __initdata = {
        .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
        .flags  = MXC_EHCI_POWER_PINS_ENABLED,
 };
 
 static int __init smartbot_otg_host_init(void)
 {
+       struct platform_device *pdev;
+
        otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
                        ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
 
-       return mxc_register_device(&mxc_otg_host, &otg_host_pdata);
+       pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
+       if (IS_ERR(pdev))
+               return PTR_ERR(pdev);
+
+       return 0;
 }
 #else
 static inline int smartbot_otg_host_init(void) { return 0; }
@@ -183,7 +186,7 @@ void __init mx31moboard_smartbot_init(int board)
 
        switch (board) {
        case MX31SMARTBOT:
-               mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+               imx31_add_fsl_usb2_udc(&usb_pdata);
                break;
        case MX31EYEBOT:
                smartbot_otg_host_init();