aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx3/mach-cpuimx35.c1
-rw-r--r--drivers/usb/gadget/fsl_mxc_udc.c15
-rw-r--r--include/linux/fsl_devices.h3
3 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 2a4f8b781ba4..4d161b3fca65 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -155,6 +155,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = {
155static struct fsl_usb2_platform_data otg_device_pdata = { 155static struct fsl_usb2_platform_data otg_device_pdata = {
156 .operating_mode = FSL_USB2_DR_DEVICE, 156 .operating_mode = FSL_USB2_DR_DEVICE,
157 .phy_mode = FSL_USB2_PHY_UTMI, 157 .phy_mode = FSL_USB2_PHY_UTMI,
158 .workaround = FLS_USB2_WORKAROUND_ENGCM09152,
158}; 159};
159 160
160static int otg_mode_host; 161static int otg_mode_host;
diff --git a/drivers/usb/gadget/fsl_mxc_udc.c b/drivers/usb/gadget/fsl_mxc_udc.c
index eafa6d2c5ed7..5bdbfe619853 100644
--- a/drivers/usb/gadget/fsl_mxc_udc.c
+++ b/drivers/usb/gadget/fsl_mxc_udc.c
@@ -22,6 +22,10 @@
22static struct clk *mxc_ahb_clk; 22static struct clk *mxc_ahb_clk;
23static struct clk *mxc_usb_clk; 23static struct clk *mxc_usb_clk;
24 24
25/* workaround ENGcm09152 for i.MX35 */
26#define USBPHYCTRL_OTGBASE_OFFSET 0x608
27#define USBPHYCTRL_EVDO (1 << 23)
28
25int fsl_udc_clk_init(struct platform_device *pdev) 29int fsl_udc_clk_init(struct platform_device *pdev)
26{ 30{
27 struct fsl_usb2_platform_data *pdata; 31 struct fsl_usb2_platform_data *pdata;
@@ -84,6 +88,17 @@ eenahb:
84void fsl_udc_clk_finalize(struct platform_device *pdev) 88void fsl_udc_clk_finalize(struct platform_device *pdev)
85{ 89{
86 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; 90 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
91#if defined(CONFIG_ARCH_MX35)
92 unsigned int v;
93
94 /* workaround ENGcm09152 for i.MX35 */
95 if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) {
96 v = readl(MX35_IO_ADDRESS(MX35_OTG_BASE_ADDR +
97 USBPHYCTRL_OTGBASE_OFFSET));
98 writel(v | USBPHYCTRL_EVDO, MX35_IO_ADDRESS(MX35_OTG_BASE_ADDR +
99 USBPHYCTRL_OTGBASE_OFFSET));
100 }
101#endif
87 102
88 /* ULPI transceivers don't need usbpll */ 103 /* ULPI transceivers don't need usbpll */
89 if (pdata->phy_mode == FSL_USB2_PHY_ULPI) { 104 if (pdata->phy_mode == FSL_USB2_PHY_ULPI) {
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index d5f9a7431bd0..4eb56ed75fbc 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -66,6 +66,7 @@ struct fsl_usb2_platform_data {
66 enum fsl_usb2_operating_modes operating_mode; 66 enum fsl_usb2_operating_modes operating_mode;
67 enum fsl_usb2_phy_modes phy_mode; 67 enum fsl_usb2_phy_modes phy_mode;
68 unsigned int port_enables; 68 unsigned int port_enables;
69 unsigned int workaround;
69 70
70 int (*init)(struct platform_device *); 71 int (*init)(struct platform_device *);
71 void (*exit)(struct platform_device *); 72 void (*exit)(struct platform_device *);
@@ -84,6 +85,8 @@ struct fsl_usb2_platform_data {
84#define FSL_USB2_PORT0_ENABLED 0x00000001 85#define FSL_USB2_PORT0_ENABLED 0x00000001
85#define FSL_USB2_PORT1_ENABLED 0x00000002 86#define FSL_USB2_PORT1_ENABLED 0x00000002
86 87
88#define FLS_USB2_WORKAROUND_ENGCM09152 (1 << 0)
89
87struct spi_device; 90struct spi_device;
88 91
89struct fsl_spi_platform_data { 92struct fsl_spi_platform_data {