aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/mach-cpuimx27.c14
-rw-r--r--arch/arm/mach-imx/mach-eukrea_cpuimx25.c16
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c7
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c7
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c6
-rw-r--r--arch/arm/mach-imx/mach-pca100.c12
-rw-r--r--arch/arm/mach-imx/mach-pcm038.c8
-rw-r--r--arch/arm/mach-mx3/mach-armadillo5x0.c10
-rw-r--r--arch/arm/mach-mx3/mach-cpuimx35.c16
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c17
-rw-r--r--arch/arm/mach-mx3/mach-mx31lilly.c17
-rw-r--r--arch/arm/mach-mx3/mach-mx31lite.c6
-rw-r--r--arch/arm/mach-mx3/mach-mx31moboard.c6
-rw-r--r--arch/arm/mach-mx3/mach-mx35_3ds.c16
-rw-r--r--arch/arm/mach-mx3/mach-pcm037.c14
-rw-r--r--arch/arm/mach-mx3/mach-pcm043.c16
-rw-r--r--arch/arm/mach-mx3/mx31moboard-devboard.c7
-rw-r--r--arch/arm/mach-mx3/mx31moboard-marxbot.c6
-rw-r--r--arch/arm/mach-mx3/mx31moboard-smartbot.c7
-rw-r--r--arch/arm/mach-mx5/board-cpuimx51.c13
-rw-r--r--arch/arm/mach-mx5/board-cpuimx51sd.c13
-rw-r--r--arch/arm/mach-mx5/board-mx51_babbage.c13
-rw-r--r--arch/arm/mach-mx5/board-mx51_efikamx.c6
-rw-r--r--arch/arm/plat-mxc/Makefile1
-rw-r--r--arch/arm/plat-mxc/ehci.c46
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc_ehci.h3
-rw-r--r--drivers/usb/host/ehci-mxc.c5
27 files changed, 191 insertions, 117 deletions
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index cabb800adbb..6b724c2ed0a 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -210,14 +210,24 @@ static struct platform_device serial_device = {
210#endif 210#endif
211 211
212#if defined(CONFIG_USB_ULPI) 212#if defined(CONFIG_USB_ULPI)
213static int eukrea_cpuimx27_otg_init(struct platform_device *pdev)
214{
215 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
216}
217
213static struct mxc_usbh_platform_data otg_pdata __initdata = { 218static struct mxc_usbh_platform_data otg_pdata __initdata = {
219 .init = eukrea_cpuimx27_otg_init,
214 .portsc = MXC_EHCI_MODE_ULPI, 220 .portsc = MXC_EHCI_MODE_ULPI,
215 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
216}; 221};
217 222
223static int eukrea_cpuimx27_usbh2_init(struct platform_device *pdev)
224{
225 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
226}
227
218static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 228static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
229 .init = eukrea_cpuimx27_usbh2_init,
219 .portsc = MXC_EHCI_MODE_ULPI, 230 .portsc = MXC_EHCI_MODE_ULPI,
220 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
221}; 231};
222#endif 232#endif
223 233
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
index 439167dbe8f..9da8d18eeb0 100644
--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
@@ -84,15 +84,25 @@ static struct i2c_board_info eukrea_cpuimx25_i2c_devices[] = {
84 }, 84 },
85}; 85};
86 86
87static int eukrea_cpuimx25_otg_init(struct platform_device *pdev)
88{
89 return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
90}
91
87static const struct mxc_usbh_platform_data otg_pdata __initconst = { 92static const struct mxc_usbh_platform_data otg_pdata __initconst = {
93 .init = eukrea_cpuimx25_otg_init,
88 .portsc = MXC_EHCI_MODE_UTMI, 94 .portsc = MXC_EHCI_MODE_UTMI,
89 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
90}; 95};
91 96
97static int eukrea_cpuimx25_usbh2_init(struct platform_device *pdev)
98{
99 return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
100 MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
101}
102
92static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { 103static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
104 .init = eukrea_cpuimx25_usbh2_init,
93 .portsc = MXC_EHCI_MODE_SERIAL, 105 .portsc = MXC_EHCI_MODE_SERIAL,
94 .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
95 MXC_EHCI_IPPUE_DOWN,
96}; 106};
97 107
98static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { 108static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 494723bf7ea..ffff2d03f78 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -30,6 +30,7 @@
30#include <linux/gpio_keys.h> 30#include <linux/gpio_keys.h>
31#include <linux/input.h> 31#include <linux/input.h>
32#include <linux/gpio.h> 32#include <linux/gpio.h>
33#include <linux/delay.h>
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
35#include <asm/mach/time.h> 36#include <asm/mach/time.h>
@@ -210,14 +211,16 @@ static struct i2c_board_info visstrim_m10_i2c_devices[] = {
210static int otg_phy_init(struct platform_device *pdev) 211static int otg_phy_init(struct platform_device *pdev)
211{ 212{
212 gpio_set_value(OTG_PHY_CS_GPIO, 0); 213 gpio_set_value(OTG_PHY_CS_GPIO, 0);
213 return 0; 214
215 mdelay(10);
216
217 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
214} 218}
215 219
216static const struct mxc_usbh_platform_data 220static const struct mxc_usbh_platform_data
217visstrim_m10_usbotg_pdata __initconst = { 221visstrim_m10_usbotg_pdata __initconst = {
218 .init = otg_phy_init, 222 .init = otg_phy_init,
219 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 223 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
220 .flags = MXC_EHCI_POWER_PINS_ENABLED,
221}; 224};
222 225
223static void __init visstrim_m10_board_init(void) 226static void __init visstrim_m10_board_init(void)
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index cd18a0c91b8..aafc6f7f181 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -185,9 +185,14 @@ static const struct matrix_keymap_data mx25pdk_keymap_data __initconst = {
185 .keymap_size = ARRAY_SIZE(mx25pdk_keymap), 185 .keymap_size = ARRAY_SIZE(mx25pdk_keymap),
186}; 186};
187 187
188static int mx25pdk_usbh2_init(struct platform_device *pdev)
189{
190 return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
191}
192
188static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { 193static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
194 .init = mx25pdk_usbh2_init,
189 .portsc = MXC_EHCI_MODE_SERIAL, 195 .portsc = MXC_EHCI_MODE_SERIAL,
190 .flags = MXC_EHCI_INTERNAL_PHY,
191}; 196};
192 197
193static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { 198static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 4e0e225ca4a..ba88417345a 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -160,10 +160,14 @@ static int otg_phy_init(void)
160} 160}
161 161
162#if defined(CONFIG_USB_ULPI) 162#if defined(CONFIG_USB_ULPI)
163static int mx27_3ds_otg_init(struct platform_device *pdev)
164{
165 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
166}
163 167
164static struct mxc_usbh_platform_data otg_pdata __initdata = { 168static struct mxc_usbh_platform_data otg_pdata __initdata = {
169 .init = mx27_3ds_otg_init,
165 .portsc = MXC_EHCI_MODE_ULPI, 170 .portsc = MXC_EHCI_MODE_ULPI,
166 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
167}; 171};
168#endif 172#endif
169 173
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index 3514178caed..f754bab040b 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -271,25 +271,29 @@ static const struct imxmmc_platform_data sdhc_pdata __initconst = {
271static int otg_phy_init(struct platform_device *pdev) 271static int otg_phy_init(struct platform_device *pdev)
272{ 272{
273 gpio_set_value(OTG_PHY_CS_GPIO, 0); 273 gpio_set_value(OTG_PHY_CS_GPIO, 0);
274 return 0; 274
275 mdelay(10);
276
277 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
275} 278}
276 279
277static struct mxc_usbh_platform_data otg_pdata __initdata = { 280static struct mxc_usbh_platform_data otg_pdata __initdata = {
278 .init = otg_phy_init, 281 .init = otg_phy_init,
279 .portsc = MXC_EHCI_MODE_ULPI, 282 .portsc = MXC_EHCI_MODE_ULPI,
280 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
281}; 283};
282 284
283static int usbh2_phy_init(struct platform_device *pdev) 285static int usbh2_phy_init(struct platform_device *pdev)
284{ 286{
285 gpio_set_value(USBH2_PHY_CS_GPIO, 0); 287 gpio_set_value(USBH2_PHY_CS_GPIO, 0);
286 return 0; 288
289 mdelay(10);
290
291 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
287} 292}
288 293
289static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 294static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
290 .init = usbh2_phy_init, 295 .init = usbh2_phy_init,
291 .portsc = MXC_EHCI_MODE_ULPI, 296 .portsc = MXC_EHCI_MODE_ULPI,
292 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
293}; 297};
294#endif 298#endif
295 299
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
index 9656ef38ca9..38c77084b61 100644
--- a/arch/arm/mach-imx/mach-pcm038.c
+++ b/arch/arm/mach-imx/mach-pcm038.c
@@ -281,9 +281,15 @@ static struct spi_board_info pcm038_spi_board_info[] __initdata = {
281 } 281 }
282}; 282};
283 283
284static int pcm038_usbh2_init(struct platform_device *pdev)
285{
286 return mx27_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
287 MXC_EHCI_INTERFACE_DIFF_UNI);
288}
289
284static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { 290static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
291 .init = pcm038_usbh2_init,
285 .portsc = MXC_EHCI_MODE_ULPI, 292 .portsc = MXC_EHCI_MODE_ULPI,
286 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
287}; 293};
288 294
289static void __init pcm038_init(void) 295static void __init pcm038_init(void)
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c
index 835e2a082b4..34e619e811e 100644
--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
+++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
@@ -176,8 +176,10 @@ static int usbotg_init(struct platform_device *pdev)
176 gpio_set_value(OTG_RESET, 0/*LOW*/); 176 gpio_set_value(OTG_RESET, 0/*LOW*/);
177 mdelay(5); 177 mdelay(5);
178 gpio_set_value(OTG_RESET, 1/*HIGH*/); 178 gpio_set_value(OTG_RESET, 1/*HIGH*/);
179 mdelay(10);
179 180
180 return 0; 181 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
182 MXC_EHCI_INTERFACE_DIFF_UNI);
181 183
182otg_free_reset: 184otg_free_reset:
183 gpio_free(OTG_RESET); 185 gpio_free(OTG_RESET);
@@ -233,8 +235,10 @@ static int usbh2_init(struct platform_device *pdev)
233 gpio_set_value(USBH2_RESET, 0/*LOW*/); 235 gpio_set_value(USBH2_RESET, 0/*LOW*/);
234 mdelay(5); 236 mdelay(5);
235 gpio_set_value(USBH2_RESET, 1/*HIGH*/); 237 gpio_set_value(USBH2_RESET, 1/*HIGH*/);
238 mdelay(10);
236 239
237 return 0; 240 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
241 MXC_EHCI_INTERFACE_DIFF_UNI);
238 242
239h2_free_reset: 243h2_free_reset:
240 gpio_free(USBH2_RESET); 244 gpio_free(USBH2_RESET);
@@ -246,13 +250,11 @@ h2_free_cs:
246static struct mxc_usbh_platform_data usbotg_pdata __initdata = { 250static struct mxc_usbh_platform_data usbotg_pdata __initdata = {
247 .init = usbotg_init, 251 .init = usbotg_init,
248 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 252 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
249 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
250}; 253};
251 254
252static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 255static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
253 .init = usbh2_init, 256 .init = usbh2_init,
254 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 257 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
255 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_DIFF_UNI,
256}; 258};
257#endif /* CONFIG_USB_ULPI */ 259#endif /* CONFIG_USB_ULPI */
258 260
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 3eedf0fcaed..0f2305626e1 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -111,15 +111,25 @@ static const struct mxc_nand_platform_data
111 .flash_bbt = 1, 111 .flash_bbt = 1,
112}; 112};
113 113
114static int eukrea_cpuimx35_otg_init(struct platform_device *pdev)
115{
116 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
117}
118
114static const struct mxc_usbh_platform_data otg_pdata __initconst = { 119static const struct mxc_usbh_platform_data otg_pdata __initconst = {
120 .init = eukrea_cpuimx35_otg_init,
115 .portsc = MXC_EHCI_MODE_UTMI, 121 .portsc = MXC_EHCI_MODE_UTMI,
116 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
117}; 122};
118 123
124static int eukrea_cpuimx35_usbh1_init(struct platform_device *pdev)
125{
126 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
127 MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
128}
129
119static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { 130static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
131 .init = eukrea_cpuimx35_usbh1_init,
120 .portsc = MXC_EHCI_MODE_SERIAL, 132 .portsc = MXC_EHCI_MODE_SERIAL,
121 .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
122 MXC_EHCI_IPPUE_DOWN,
123}; 133};
124 134
125static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { 135static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 3d0ded92a8a..2d744b27f63 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -245,7 +245,13 @@ usbotg_free_reset:
245 return err; 245 return err;
246} 246}
247 247
248static int __maybe_unused mx31_3ds_host2_init(struct platform_device *pdev) 248#if defined(CONFIG_USB_ULPI)
249static int mx31_3ds_otg_init(struct platform_device *pdev)
250{
251 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
252}
253
254static int mx31_3ds_host2_init(struct platform_device *pdev)
249{ 255{
250 int err; 256 int err;
251 257
@@ -276,23 +282,24 @@ static int __maybe_unused mx31_3ds_host2_init(struct platform_device *pdev)
276 282
277 mdelay(1); 283 mdelay(1);
278 gpio_set_value(USBH2_RST_B, 1); 284 gpio_set_value(USBH2_RST_B, 1);
279 return 0; 285
286 mdelay(10);
287
288 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
280 289
281usbotg_free_reset: 290usbotg_free_reset:
282 gpio_free(USBH2_RST_B); 291 gpio_free(USBH2_RST_B);
283 return err; 292 return err;
284} 293}
285 294
286#if defined(CONFIG_USB_ULPI)
287static struct mxc_usbh_platform_data otg_pdata __initdata = { 295static struct mxc_usbh_platform_data otg_pdata __initdata = {
296 .init = mx31_3ds_otg_init,
288 .portsc = MXC_EHCI_MODE_ULPI, 297 .portsc = MXC_EHCI_MODE_ULPI,
289 .flags = MXC_EHCI_POWER_PINS_ENABLED,
290}; 298};
291 299
292static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 300static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
293 .init = mx31_3ds_host2_init, 301 .init = mx31_3ds_host2_init,
294 .portsc = MXC_EHCI_MODE_ULPI, 302 .portsc = MXC_EHCI_MODE_ULPI,
295 .flags = MXC_EHCI_POWER_PINS_ENABLED,
296}; 303};
297#endif 304#endif
298 305
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c
index 1c3f4913d1e..be79a0d6301 100644
--- a/arch/arm/mach-mx3/mach-mx31lilly.c
+++ b/arch/arm/mach-mx3/mach-mx31lilly.c
@@ -24,6 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/delay.h>
27#include <linux/platform_device.h> 28#include <linux/platform_device.h>
28#include <linux/interrupt.h> 29#include <linux/interrupt.h>
29#include <linux/smsc911x.h> 30#include <linux/smsc911x.h>
@@ -156,7 +157,9 @@ static int usbotg_init(struct platform_device *pdev)
156 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), "USBH1 CS"); 157 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), "USBH1 CS");
157 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), 0); 158 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE2), 0);
158 159
159 return 0; 160 mdelay(10);
161
162 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
160} 163}
161 164
162static int usbh1_init(struct platform_device *pdev) 165static int usbh1_init(struct platform_device *pdev)
@@ -183,7 +186,10 @@ static int usbh1_init(struct platform_device *pdev)
183 186
184 mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true); 187 mxc_iomux_set_gpr(MUX_PGP_USB_SUSPEND, true);
185 188
186 return 0; 189 mdelay(10);
190
191 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
192 MXC_EHCI_INTERFACE_SINGLE_UNI);
187} 193}
188 194
189static int usbh2_init(struct platform_device *pdev) 195static int usbh2_init(struct platform_device *pdev)
@@ -220,25 +226,24 @@ static int usbh2_init(struct platform_device *pdev)
220 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS"); 226 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
221 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0); 227 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
222 228
223 return 0; 229 mdelay(10);
230
231 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
224} 232}
225 233
226static struct mxc_usbh_platform_data usbotg_pdata = { 234static struct mxc_usbh_platform_data usbotg_pdata = {
227 .init = usbotg_init, 235 .init = usbotg_init,
228 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 236 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
229 .flags = MXC_EHCI_POWER_PINS_ENABLED,
230}; 237};
231 238
232static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { 239static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
233 .init = usbh1_init, 240 .init = usbh1_init,
234 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, 241 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
235 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
236}; 242};
237 243
238static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 244static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
239 .init = usbh2_init, 245 .init = usbh2_init,
240 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 246 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
241 .flags = MXC_EHCI_POWER_PINS_ENABLED,
242}; 247};
243 248
244static void lilly1131_usb_init(void) 249static void lilly1131_usb_init(void)
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c
index 01e24b5045e..e146f1a72da 100644
--- a/arch/arm/mach-mx3/mach-mx31lite.c
+++ b/arch/arm/mach-mx3/mach-mx31lite.c
@@ -27,6 +27,7 @@
27#include <linux/usb/otg.h> 27#include <linux/usb/otg.h>
28#include <linux/usb/ulpi.h> 28#include <linux/usb/ulpi.h>
29#include <linux/mtd/physmap.h> 29#include <linux/mtd/physmap.h>
30#include <linux/delay.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -167,13 +168,14 @@ static int usbh2_init(struct platform_device *pdev)
167 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS"); 168 gpio_request(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), "USBH2 CS");
168 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0); 169 gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_DTR_DCE1), 0);
169 170
170 return 0; 171 mdelay(10);
172
173 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
171} 174}
172 175
173static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 176static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
174 .init = usbh2_init, 177 .init = usbh2_init,
175 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 178 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
176 .flags = MXC_EHCI_POWER_PINS_ENABLED,
177}; 179};
178#endif 180#endif
179 181
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index fd988a0d9a5..ea880330e83 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -401,10 +401,14 @@ static void usb_xcvr_reset(void)
401} 401}
402 402
403#if defined(CONFIG_USB_ULPI) 403#if defined(CONFIG_USB_ULPI)
404static int moboard_usbh2_init_hw(struct platform_device *pdev)
405{
406 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
407}
404 408
405static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 409static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
410 .init = moboard_usbh2_init_hw,
406 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 411 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
407 .flags = MXC_EHCI_POWER_PINS_ENABLED,
408}; 412};
409 413
410static int __init moboard_usbh2_init(void) 414static int __init moboard_usbh2_init(void)
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index c5115dc5c0c..dac1896a5b2 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -120,6 +120,11 @@ static iomux_v3_cfg_t mx35pdk_pads[] = {
120 MX35_PAD_SD1_DATA3__ESDHC1_DAT3, 120 MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
121}; 121};
122 122
123static int mx35_3ds_otg_init(struct platform_device *pdev)
124{
125 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
126}
127
123/* OTG config */ 128/* OTG config */
124static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = { 129static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = {
125 .operating_mode = FSL_USB2_DR_DEVICE, 130 .operating_mode = FSL_USB2_DR_DEVICE,
@@ -127,15 +132,20 @@ static const struct fsl_usb2_platform_data usb_otg_pdata __initconst = {
127}; 132};
128 133
129static struct mxc_usbh_platform_data otg_pdata __initdata = { 134static struct mxc_usbh_platform_data otg_pdata __initdata = {
135 .init = mx35_3ds_otg_init,
130 .portsc = MXC_EHCI_MODE_UTMI, 136 .portsc = MXC_EHCI_MODE_UTMI,
131 .flags = MXC_EHCI_INTERNAL_PHY,
132}; 137};
133 138
139static int mx35_3ds_usbh_init(struct platform_device *pdev)
140{
141 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
142 MXC_EHCI_INTERNAL_PHY);
143}
144
134/* USB HOST config */ 145/* USB HOST config */
135static const struct mxc_usbh_platform_data usb_host_pdata __initconst = { 146static const struct mxc_usbh_platform_data usb_host_pdata __initconst = {
147 .init = mx35_3ds_usbh_init,
136 .portsc = MXC_EHCI_MODE_SERIAL, 148 .portsc = MXC_EHCI_MODE_SERIAL,
137 .flags = MXC_EHCI_INTERFACE_SINGLE_UNI |
138 MXC_EHCI_INTERNAL_PHY,
139}; 149};
140 150
141static int otg_mode_host; 151static int otg_mode_host;
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index 7d444f714f3..55f95d42f71 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -534,14 +534,24 @@ static struct platform_device pcm970_sja1000 = {
534}; 534};
535 535
536#if defined(CONFIG_USB_ULPI) 536#if defined(CONFIG_USB_ULPI)
537static int pcm037_otg_init(struct platform_device *pdev)
538{
539 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
540}
541
537static struct mxc_usbh_platform_data otg_pdata __initdata = { 542static struct mxc_usbh_platform_data otg_pdata __initdata = {
543 .init = pcm037_otg_init,
538 .portsc = MXC_EHCI_MODE_ULPI, 544 .portsc = MXC_EHCI_MODE_ULPI,
539 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
540}; 545};
541 546
547static int pcm037_usbh2_init(struct platform_device *pdev)
548{
549 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
550}
551
542static struct mxc_usbh_platform_data usbh2_pdata __initdata = { 552static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
553 .init = pcm037_usbh2_init,
543 .portsc = MXC_EHCI_MODE_ULPI, 554 .portsc = MXC_EHCI_MODE_ULPI,
544 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
545}; 555};
546#endif 556#endif
547 557
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c
index b03e19d6548..4fa07142a9b 100644
--- a/arch/arm/mach-mx3/mach-pcm043.c
+++ b/arch/arm/mach-mx3/mach-pcm043.c
@@ -306,16 +306,26 @@ pcm037_nand_board_info __initconst = {
306}; 306};
307 307
308#if defined(CONFIG_USB_ULPI) 308#if defined(CONFIG_USB_ULPI)
309static int pcm043_otg_init(struct platform_device *pdev)
310{
311 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
312}
313
309static struct mxc_usbh_platform_data otg_pdata __initdata = { 314static struct mxc_usbh_platform_data otg_pdata __initdata = {
315 .init = pcm043_otg_init,
310 .portsc = MXC_EHCI_MODE_UTMI, 316 .portsc = MXC_EHCI_MODE_UTMI,
311 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
312}; 317};
313#endif 318#endif
314 319
320static int pcm043_usbh1_init(struct platform_device *pdev)
321{
322 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
323 MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
324}
325
315static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { 326static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
327 .init = pcm043_usbh1_init,
316 .portsc = MXC_EHCI_MODE_SERIAL, 328 .portsc = MXC_EHCI_MODE_SERIAL,
317 .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
318 MXC_EHCI_IPPUE_DOWN,
319}; 329};
320 330
321static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { 331static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c
index 94a0b9e4b7f..6410b9c48a0 100644
--- a/arch/arm/mach-mx3/mx31moboard-devboard.c
+++ b/arch/arm/mach-mx3/mx31moboard-devboard.c
@@ -15,6 +15,7 @@
15#include <linux/gpio.h> 15#include <linux/gpio.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/delay.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
20#include <linux/types.h> 21#include <linux/types.h>
@@ -149,7 +150,10 @@ static int devboard_usbh1_hw_init(struct platform_device *pdev)
149 mxc_iomux_set_pad(MX31_PIN_CSPI1_SPI_RDY, USB_PAD_CFG); 150 mxc_iomux_set_pad(MX31_PIN_CSPI1_SPI_RDY, USB_PAD_CFG);
150 mxc_iomux_set_pad(MX31_PIN_SFS6, USB_PAD_CFG); 151 mxc_iomux_set_pad(MX31_PIN_SFS6, USB_PAD_CFG);
151 152
152 return 0; 153 mdelay(10);
154
155 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
156 MXC_EHCI_INTERFACE_SINGLE_UNI);
153} 157}
154 158
155#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B) 159#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B)
@@ -187,7 +191,6 @@ static int devboard_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
187static struct mxc_usbh_platform_data usbh1_pdata __initdata = { 191static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
188 .init = devboard_usbh1_hw_init, 192 .init = devboard_usbh1_hw_init,
189 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, 193 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
190 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
191}; 194};
192 195
193static int __init devboard_usbh1_init(void) 196static int __init devboard_usbh1_init(void)
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c
index f449a97ae1a..57f7b00cb70 100644
--- a/arch/arm/mach-mx3/mx31moboard-marxbot.c
+++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c
@@ -265,7 +265,10 @@ static int marxbot_usbh1_hw_init(struct platform_device *pdev)
265 mxc_iomux_set_pad(MX31_PIN_CSPI1_SPI_RDY, USB_PAD_CFG); 265 mxc_iomux_set_pad(MX31_PIN_CSPI1_SPI_RDY, USB_PAD_CFG);
266 mxc_iomux_set_pad(MX31_PIN_SFS6, USB_PAD_CFG); 266 mxc_iomux_set_pad(MX31_PIN_SFS6, USB_PAD_CFG);
267 267
268 return 0; 268 mdelay(10);
269
270 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED |
271 MXC_EHCI_INTERFACE_SINGLE_UNI);
269} 272}
270 273
271#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B) 274#define USBH1_VBUSEN_B IOMUX_TO_GPIO(MX31_PIN_NFRE_B)
@@ -303,7 +306,6 @@ static int marxbot_isp1105_set_vbus(struct otg_transceiver *otg, bool on)
303static struct mxc_usbh_platform_data usbh1_pdata __initdata = { 306static struct mxc_usbh_platform_data usbh1_pdata __initdata = {
304 .init = marxbot_usbh1_hw_init, 307 .init = marxbot_usbh1_hw_init,
305 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL, 308 .portsc = MXC_EHCI_MODE_UTMI | MXC_EHCI_SERIAL,
306 .flags = MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_INTERFACE_SINGLE_UNI,
307}; 309};
308 310
309static int __init marxbot_usbh1_init(void) 311static int __init marxbot_usbh1_init(void)
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c
index bbec3c82264..87d556f40ec 100644
--- a/arch/arm/mach-mx3/mx31moboard-smartbot.c
+++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c
@@ -123,9 +123,14 @@ static const struct fsl_usb2_platform_data usb_pdata __initconst = {
123 123
124#if defined(CONFIG_USB_ULPI) 124#if defined(CONFIG_USB_ULPI)
125 125
126static int smartbot_otg_init(struct platform_device *pdev)
127{
128 return mx31_initialize_usb_hw(pdev->id, MXC_EHCI_POWER_PINS_ENABLED);
129}
130
126static struct mxc_usbh_platform_data otg_host_pdata __initdata = { 131static struct mxc_usbh_platform_data otg_host_pdata __initdata = {
132 .init = smartbot_otg_init,
127 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, 133 .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT,
128 .flags = MXC_EHCI_POWER_PINS_ENABLED,
129}; 134};
130 135
131static int __init smartbot_otg_host_init(void) 136static int __init smartbot_otg_host_init(void)
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
index 2d4199d3790..d0296a94c47 100644
--- a/arch/arm/mach-mx5/board-cpuimx51.c
+++ b/arch/arm/mach-mx5/board-cpuimx51.c
@@ -184,7 +184,10 @@ static int initialize_otg_port(struct platform_device *pdev)
184 v |= MX51_USB_PLL_DIV_19_2_MHZ; 184 v |= MX51_USB_PLL_DIV_19_2_MHZ;
185 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); 185 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
186 iounmap(usb_base); 186 iounmap(usb_base);
187 return 0; 187
188 mdelay(10);
189
190 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
188} 191}
189 192
190static int initialize_usbh1_port(struct platform_device *pdev) 193static int initialize_usbh1_port(struct platform_device *pdev)
@@ -202,13 +205,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
202 v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET); 205 v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET);
203 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET); 206 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
204 iounmap(usb_base); 207 iounmap(usb_base);
205 return 0; 208
209 mdelay(10);
210
211 return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
212 MXC_EHCI_ITC_NO_THRESHOLD);
206} 213}
207 214
208static struct mxc_usbh_platform_data dr_utmi_config = { 215static struct mxc_usbh_platform_data dr_utmi_config = {
209 .init = initialize_otg_port, 216 .init = initialize_otg_port,
210 .portsc = MXC_EHCI_UTMI_16BIT, 217 .portsc = MXC_EHCI_UTMI_16BIT,
211 .flags = MXC_EHCI_INTERNAL_PHY,
212}; 218};
213 219
214static struct fsl_usb2_platform_data usb_pdata = { 220static struct fsl_usb2_platform_data usb_pdata = {
@@ -219,7 +225,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
219static struct mxc_usbh_platform_data usbh1_config = { 225static struct mxc_usbh_platform_data usbh1_config = {
220 .init = initialize_usbh1_port, 226 .init = initialize_usbh1_port,
221 .portsc = MXC_EHCI_MODE_ULPI, 227 .portsc = MXC_EHCI_MODE_ULPI,
222 .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
223}; 228};
224 229
225static int otg_mode_host; 230static int otg_mode_host;
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
index 6c3b445e395..f38b341ac40 100644
--- a/arch/arm/mach-mx5/board-cpuimx51sd.c
+++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
@@ -167,7 +167,10 @@ static int initialize_otg_port(struct platform_device *pdev)
167 v |= MX51_USB_PLL_DIV_19_2_MHZ; 167 v |= MX51_USB_PLL_DIV_19_2_MHZ;
168 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); 168 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
169 iounmap(usb_base); 169 iounmap(usb_base);
170 return 0; 170
171 mdelay(10);
172
173 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
171} 174}
172 175
173static int initialize_usbh1_port(struct platform_device *pdev) 176static int initialize_usbh1_port(struct platform_device *pdev)
@@ -186,13 +189,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
186 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, 189 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN,
187 usbother_base + MX51_USB_CTRL_1_OFFSET); 190 usbother_base + MX51_USB_CTRL_1_OFFSET);
188 iounmap(usb_base); 191 iounmap(usb_base);
189 return 0; 192
193 mdelay(10);
194
195 return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
196 MXC_EHCI_ITC_NO_THRESHOLD);
190} 197}
191 198
192static struct mxc_usbh_platform_data dr_utmi_config = { 199static struct mxc_usbh_platform_data dr_utmi_config = {
193 .init = initialize_otg_port, 200 .init = initialize_otg_port,
194 .portsc = MXC_EHCI_UTMI_16BIT, 201 .portsc = MXC_EHCI_UTMI_16BIT,
195 .flags = MXC_EHCI_INTERNAL_PHY,
196}; 202};
197 203
198static struct fsl_usb2_platform_data usb_pdata = { 204static struct fsl_usb2_platform_data usb_pdata = {
@@ -203,7 +209,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
203static struct mxc_usbh_platform_data usbh1_config = { 209static struct mxc_usbh_platform_data usbh1_config = {
204 .init = initialize_usbh1_port, 210 .init = initialize_usbh1_port,
205 .portsc = MXC_EHCI_MODE_ULPI, 211 .portsc = MXC_EHCI_MODE_ULPI,
206 .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
207}; 212};
208 213
209static int otg_mode_host; 214static int otg_mode_host;
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index 2bd9c9e4e6b..7874bcd41db 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -259,7 +259,10 @@ static int initialize_otg_port(struct platform_device *pdev)
259 v |= MX51_USB_PLL_DIV_19_2_MHZ; 259 v |= MX51_USB_PLL_DIV_19_2_MHZ;
260 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); 260 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
261 iounmap(usb_base); 261 iounmap(usb_base);
262 return 0; 262
263 mdelay(10);
264
265 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
263} 266}
264 267
265static int initialize_usbh1_port(struct platform_device *pdev) 268static int initialize_usbh1_port(struct platform_device *pdev)
@@ -277,13 +280,16 @@ static int initialize_usbh1_port(struct platform_device *pdev)
277 v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET); 280 v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET);
278 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET); 281 __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET);
279 iounmap(usb_base); 282 iounmap(usb_base);
280 return 0; 283
284 mdelay(10);
285
286 return mx51_initialize_usb_hw(1, MXC_EHCI_POWER_PINS_ENABLED |
287 MXC_EHCI_ITC_NO_THRESHOLD);
281} 288}
282 289
283static struct mxc_usbh_platform_data dr_utmi_config = { 290static struct mxc_usbh_platform_data dr_utmi_config = {
284 .init = initialize_otg_port, 291 .init = initialize_otg_port,
285 .portsc = MXC_EHCI_UTMI_16BIT, 292 .portsc = MXC_EHCI_UTMI_16BIT,
286 .flags = MXC_EHCI_INTERNAL_PHY,
287}; 293};
288 294
289static struct fsl_usb2_platform_data usb_pdata = { 295static struct fsl_usb2_platform_data usb_pdata = {
@@ -294,7 +300,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
294static struct mxc_usbh_platform_data usbh1_config = { 300static struct mxc_usbh_platform_data usbh1_config = {
295 .init = initialize_usbh1_port, 301 .init = initialize_usbh1_port,
296 .portsc = MXC_EHCI_MODE_ULPI, 302 .portsc = MXC_EHCI_MODE_ULPI,
297 .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD),
298}; 303};
299 304
300static int otg_mode_host; 305static int otg_mode_host;
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index 2aac4c5b7b5..b0fa55327c3 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -145,13 +145,15 @@ static int initialize_otg_port(struct platform_device *pdev)
145 v |= MX51_USB_PLL_DIV_24_MHZ; 145 v |= MX51_USB_PLL_DIV_24_MHZ;
146 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); 146 __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET);
147 iounmap(usb_base); 147 iounmap(usb_base);
148 return 0; 148
149 mdelay(10);
150
151 return mx51_initialize_usb_hw(0, MXC_EHCI_INTERNAL_PHY);
149} 152}
150 153
151static struct mxc_usbh_platform_data dr_utmi_config = { 154static struct mxc_usbh_platform_data dr_utmi_config = {
152 .init = initialize_otg_port, 155 .init = initialize_otg_port,
153 .portsc = MXC_EHCI_UTMI_16BIT, 156 .portsc = MXC_EHCI_UTMI_16BIT,
154 .flags = MXC_EHCI_INTERNAL_PHY,
155}; 157};
156 158
157/* PCBID2 PCBID1 PCBID0 STATE 159/* PCBID2 PCBID1 PCBID0 STATE
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile
index 5fd20e96876..a1387875a49 100644
--- a/arch/arm/plat-mxc/Makefile
+++ b/arch/arm/plat-mxc/Makefile
@@ -13,7 +13,6 @@ obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o
13obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o 13obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
14obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o 14obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o
15obj-$(CONFIG_MXC_PWM) += pwm.o 15obj-$(CONFIG_MXC_PWM) += pwm.o
16obj-$(CONFIG_USB_EHCI_MXC) += ehci.o
17obj-$(CONFIG_MXC_ULPI) += ulpi.o 16obj-$(CONFIG_MXC_ULPI) += ulpi.o
18obj-$(CONFIG_MXC_USE_EPIT) += epit.o 17obj-$(CONFIG_MXC_USE_EPIT) += epit.o
19obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o 18obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o
diff --git a/arch/arm/plat-mxc/ehci.c b/arch/arm/plat-mxc/ehci.c
deleted file mode 100644
index 06fb3a4d7c2..00000000000
--- a/arch/arm/plat-mxc/ehci.c
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
3 * Copyright (C) 2010 Freescale Semiconductor, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16#include <linux/platform_device.h>
17
18#include <mach/hardware.h>
19#include <mach/mxc_ehci.h>
20
21int mxc_initialize_usb_hw(int port, unsigned int flags)
22{
23#if defined(CONFIG_SOC_IMX25)
24 if (cpu_is_mx25())
25 return mx25_initialize_usb_hw(port, flags);
26#endif /* if defined(CONFIG_SOC_IMX25) */
27#if defined(CONFIG_ARCH_MX3)
28 if (cpu_is_mx31())
29 return mx31_initialize_usb_hw(port, flags);
30 if (cpu_is_mx35())
31 return mx35_initialize_usb_hw(port, flags);
32#endif /* CONFIG_ARCH_MX3 */
33#ifdef CONFIG_MACH_MX27
34 if (cpu_is_mx27())
35 return mx27_initialize_usb_hw(port, flags);
36#endif /* CONFIG_MACH_MX27 */
37#ifdef CONFIG_SOC_IMX51
38 if (cpu_is_mx51())
39 return mx51_initialize_usb_hw(port, flags);
40#endif
41 printk(KERN_WARNING
42 "%s() unable to setup USBCONTROL for this CPU\n", __func__);
43 return -EINVAL;
44}
45EXPORT_SYMBOL(mxc_initialize_usb_hw);
46
diff --git a/arch/arm/plat-mxc/include/mach/mxc_ehci.h b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
index 7e555a1f4a4..2c159dc2398 100644
--- a/arch/arm/plat-mxc/include/mach/mxc_ehci.h
+++ b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
@@ -44,12 +44,9 @@ struct mxc_usbh_platform_data {
44 int (*exit)(struct platform_device *pdev); 44 int (*exit)(struct platform_device *pdev);
45 45
46 unsigned int portsc; 46 unsigned int portsc;
47 unsigned int flags;
48 struct otg_transceiver *otg; 47 struct otg_transceiver *otg;
49}; 48};
50 49
51int mxc_initialize_usb_hw(int port, unsigned int flags);
52
53int mx51_initialize_usb_hw(int port, unsigned int flags); 50int mx51_initialize_usb_hw(int port, unsigned int flags);
54int mx25_initialize_usb_hw(int port, unsigned int flags); 51int mx25_initialize_usb_hw(int port, unsigned int flags);
55int mx31_initialize_usb_hw(int port, unsigned int flags); 52int mx31_initialize_usb_hw(int port, unsigned int flags);
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index c8e360d7d97..25c8c10bb68 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -203,11 +203,6 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
203 mdelay(10); 203 mdelay(10);
204 } 204 }
205 205
206 /* setup specific usb hw */
207 ret = mxc_initialize_usb_hw(pdev->id, pdata->flags);
208 if (ret < 0)
209 goto err_init;
210
211 ehci = hcd_to_ehci(hcd); 206 ehci = hcd_to_ehci(hcd);
212 207
213 /* EHCI registers start at offset 0x100 */ 208 /* EHCI registers start at offset 0x100 */