diff options
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard-marxbot.c')
-rw-r--r-- | arch/arm/mach-mx3/mx31moboard-marxbot.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 18069cb7d068..f449a97ae1a2 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/fsl_devices.h> | ||
25 | 24 | ||
26 | #include <linux/usb/otg.h> | 25 | #include <linux/usb/otg.h> |
27 | 26 | ||
@@ -29,12 +28,11 @@ | |||
29 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
30 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
31 | #include <mach/iomux-mx3.h> | 30 | #include <mach/iomux-mx3.h> |
32 | #include <mach/mmc.h> | ||
33 | #include <mach/mxc_ehci.h> | ||
34 | #include <mach/ulpi.h> | 31 | #include <mach/ulpi.h> |
35 | 32 | ||
36 | #include <media/soc_camera.h> | 33 | #include <media/soc_camera.h> |
37 | 34 | ||
35 | #include "devices-imx31.h" | ||
38 | #include "devices.h" | 36 | #include "devices.h" |
39 | 37 | ||
40 | static unsigned int marxbot_pins[] = { | 38 | static unsigned int marxbot_pins[] = { |
@@ -116,7 +114,7 @@ static void marxbot_sdhc2_exit(struct device *dev, void *data) | |||
116 | gpio_free(SDHC2_CD); | 114 | gpio_free(SDHC2_CD); |
117 | } | 115 | } |
118 | 116 | ||
119 | static struct imxmmc_platform_data sdhc2_pdata = { | 117 | static const struct imxmmc_platform_data sdhc2_pdata __initconst = { |
120 | .get_ro = marxbot_sdhc2_get_ro, | 118 | .get_ro = marxbot_sdhc2_get_ro, |
121 | .init = marxbot_sdhc2_init, | 119 | .init = marxbot_sdhc2_init, |
122 | .exit = marxbot_sdhc2_exit, | 120 | .exit = marxbot_sdhc2_exit, |
@@ -302,7 +300,7 @@ static int marxbot_isp1105_set_vbus(struct otg_transceiver *otg, bool on) | |||
302 | return 0; | 300 | return 0; |
303 | } | 301 | } |
304 | 302 | ||
305 | static struct mxc_usbh_platform_data usbh1_pdata = { | 303 | static struct mxc_usbh_platform_data usbh1_pdata __initdata = { |
306 | .init = marxbot_usbh1_hw_init, | 304 | .init = marxbot_usbh1_hw_init, |
307 | .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, | 305 | .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, |
308 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI, | 306 | .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI, |
@@ -311,6 +309,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = { | |||
311 | static int __init marxbot_usbh1_init(void) | 309 | static int __init marxbot_usbh1_init(void) |
312 | { | 310 | { |
313 | struct otg_transceiver *otg; | 311 | struct otg_transceiver *otg; |
312 | struct platform_device *pdev; | ||
314 | 313 | ||
315 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); | 314 | otg = kzalloc(sizeof(*otg), GFP_KERNEL); |
316 | if (!otg) | 315 | if (!otg) |
@@ -322,10 +321,14 @@ static int __init marxbot_usbh1_init(void) | |||
322 | 321 | ||
323 | usbh1_pdata.otg = otg; | 322 | usbh1_pdata.otg = otg; |
324 | 323 | ||
325 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 324 | pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); |
325 | if (IS_ERR(pdev)) | ||
326 | return PTR_ERR(pdev); | ||
327 | |||
328 | return 0; | ||
326 | } | 329 | } |
327 | 330 | ||
328 | static struct fsl_usb2_platform_data usb_pdata = { | 331 | static const struct fsl_usb2_platform_data usb_pdata __initconst = { |
329 | .operating_mode = FSL_USB2_DR_DEVICE, | 332 | .operating_mode = FSL_USB2_DR_DEVICE, |
330 | .phy_mode = FSL_USB2_PHY_ULPI, | 333 | .phy_mode = FSL_USB2_PHY_ULPI, |
331 | }; | 334 | }; |
@@ -344,7 +347,7 @@ void __init mx31moboard_marxbot_init(void) | |||
344 | 347 | ||
345 | dspics_resets_init(); | 348 | dspics_resets_init(); |
346 | 349 | ||
347 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 350 | imx31_add_mxc_mmc(1, &sdhc2_pdata); |
348 | 351 | ||
349 | spi_register_board_info(marxbot_spi_board_info, | 352 | spi_register_board_info(marxbot_spi_board_info, |
350 | ARRAY_SIZE(marxbot_spi_board_info)); | 353 | ARRAY_SIZE(marxbot_spi_board_info)); |
@@ -357,7 +360,7 @@ void __init mx31moboard_marxbot_init(void) | |||
357 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0)); | 360 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_LCS0)); |
358 | gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false); | 361 | gpio_export(IOMUX_TO_GPIO(MX31_PIN_LCS0), false); |
359 | 362 | ||
360 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 363 | imx31_add_fsl_usb2_udc(&usb_pdata); |
361 | 364 | ||
362 | marxbot_usbh1_init(); | 365 | marxbot_usbh1_init(); |
363 | } | 366 | } |