aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mx31moboard-smartbot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mx31moboard-smartbot.c')
-rw-r--r--arch/arm/mach-mx3/mx31moboard-smartbot.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c
index 04760a53005a..bbec3c82264a 100644
--- a/arch/arm/mach-mx3/mx31moboard-smartbot.c
+++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c
@@ -19,7 +19,6 @@
19#include <linux/i2c.h> 19#include <linux/i2c.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/fsl_devices.h>
23 22
24#include <linux/usb/otg.h> 23#include <linux/usb/otg.h>
25#include <linux/usb/ulpi.h> 24#include <linux/usb/ulpi.h>
@@ -28,7 +27,6 @@
28#include <mach/hardware.h> 27#include <mach/hardware.h>
29#include <mach/iomux-mx3.h> 28#include <mach/iomux-mx3.h>
30#include <mach/board-mx31moboard.h> 29#include <mach/board-mx31moboard.h>
31#include <mach/mxc_ehci.h>
32#include <mach/ulpi.h> 30#include <mach/ulpi.h>
33 31
34#include <media/soc_camera.h> 32#include <media/soc_camera.h>
@@ -118,24 +116,30 @@ static int __init smartbot_cam_init(void)
118 return 0; 116 return 0;
119} 117}
120 118
121static struct fsl_usb2_platform_data usb_pdata = { 119static const struct fsl_usb2_platform_data usb_pdata __initconst = {
122 .operating_mode = FSL_USB2_DR_DEVICE, 120 .operating_mode = FSL_USB2_DR_DEVICE,
123 .phy_mode = FSL_USB2_PHY_ULPI, 121 .phy_mode = FSL_USB2_PHY_ULPI,
124}; 122};
125 123
126#if defined(CONFIG_USB_ULPI) 124#if defined(CONFIG_USB_ULPI)
127 125
128static struct mxc_usbh_platform_data otg_host_pdata = { 126static struct mxc_usbh_platform_data otg_host_pdata __initdata = {
129 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 127 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
130 .flags = MXC_EHCI_POWER_PINS_ENABLED, 128 .flags = MXC_EHCI_POWER_PINS_ENABLED,
131}; 129};
132 130
133static int __init smartbot_otg_host_init(void) 131static int __init smartbot_otg_host_init(void)
134{ 132{
133 struct platform_device *pdev;
134
135 otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 135 otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
136 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 136 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
137 137
138 return mxc_register_device(&mxc_otg_host, &otg_host_pdata); 138 pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
139 if (IS_ERR(pdev))
140 return PTR_ERR(pdev);
141
142 return 0;
139} 143}
140#else 144#else
141static inline int smartbot_otg_host_init(void) { return 0; } 145static inline int smartbot_otg_host_init(void) { return 0; }
@@ -182,7 +186,7 @@ void __init mx31moboard_smartbot_init(int board)
182 186
183 switch (board) { 187 switch (board) {
184 case MX31SMARTBOT: 188 case MX31SMARTBOT:
185 mxc_register_device(&mxc_otg_udc_device, &usb_pdata); 189 imx31_add_fsl_usb2_udc(&usb_pdata);
186 break; 190 break;
187 case MX31EYEBOT: 191 case MX31EYEBOT:
188 smartbot_otg_host_init(); 192 smartbot_otg_host_init();