]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-mx3/mx31moboard-marxbot.c
ARM: mx3: dynamically allocate fsl-usb2-udc devices
[karo-tx-linux.git] / arch / arm / mach-mx3 / mx31moboard-marxbot.c
index 0551eb39d97eec32f7694538838eae418940da80..db79f744c3014a8ff9ad0b1bc8c3b8405e456708 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 +115,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,
@@ -326,7 +325,7 @@ static int __init marxbot_usbh1_init(void)
        return mxc_register_device(&mxc_usbh1, &usbh1_pdata);
 }
 
-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 +344,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 +357,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();
 }