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-marxbot.c
index 0551eb3..f449a97 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/slab.h>
 #include <linux/platform_device.h>
 #include <linux/types.h>
-#include <linux/fsl_devices.h>
 
 #include <linux/usb/otg.h>
 
 #include <mach/hardware.h>
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
-#include <mach/mmc.h>
-#include <mach/mxc_ehci.h>
 #include <mach/ulpi.h>
 
 #include <media/soc_camera.h>
 
+#include "devices-imx31.h"
 #include "devices.h"
 
 static unsigned int marxbot_pins[] = {
@@ -116,7 +114,7 @@ static void marxbot_sdhc2_exit(struct device *dev, void *data)
        gpio_free(SDHC2_CD);
 }
 
-static struct imxmmc_platform_data sdhc2_pdata = {
+static const struct imxmmc_platform_data sdhc2_pdata __initconst = {
        .get_ro = marxbot_sdhc2_get_ro,
        .init   = marxbot_sdhc2_init,
        .exit   = marxbot_sdhc2_exit,
@@ -179,7 +177,6 @@ static struct soc_camera_link base_iclink = {
        .reset          = marxbot_basecam_reset,
        .board_info     = &marxbot_i2c_devices[0],
        .i2c_adapter_id = 0,
-       .module_name    = "mt9t031",
 };
 
 static struct platform_device marxbot_camera[] = {
@@ -303,7 +300,7 @@ static int marxbot_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
        return 0;
 }
 
-static struct mxc_usbh_platform_data usbh1_pdata = {
+static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
        .init   = marxbot_usbh1_hw_init,
        .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
        .flags  = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
@@ -312,6 +309,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = {
 static int __init marxbot_usbh1_init(void)
 {
        struct otg_transceiver *otg;
+       struct platform_device *pdev;
 
        otg = kzalloc(sizeof(*otg), GFP_KERNEL);
        if (!otg)
@@ -323,10 +321,14 @@ static int __init marxbot_usbh1_init(void)
 
        usbh1_pdata.otg = otg;
 
-       return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
+       pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
+       if (IS_ERR(pdev))
+               return PTR_ERR(pdev);
+
+       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,
 };
@@ -345,7 +347,7 @@ void __init mx31moboard_marxbot_init(void)
 
        dspics_resets_init();
 
-       mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata);
+       imx31_add_mxc_mmc(1, &sdhc2_pdata);
 
        spi_register_board_info(marxbot_spi_board_info,
                ARRAY_SIZE(marxbot_spi_board_info));
@@ -358,7 +360,7 @@ void __init mx31moboard_marxbot_init(void)
        gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0));
        gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false);
 
-       mxc_register_device(&mxc_otg_udc_device, &usb_pdata);
+       imx31_add_fsl_usb2_udc(&usb_pdata);
 
        marxbot_usbh1_init();
 }