File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = {
155155static struct fsl_usb2_platform_data otg_device_pdata = {
156156 .operating_mode = FSL_USB2_DR_DEVICE ,
157157 .phy_mode = FSL_USB2_PHY_UTMI ,
158+ .workaround = FLS_USB2_WORKAROUND_ENGCM09152 ,
158159};
159160
160161static int otg_mode_host ;
Original file line number Diff line number Diff line change 2222static struct clk * mxc_ahb_clk ;
2323static struct clk * mxc_usb_clk ;
2424
25+ /* workaround ENGcm09152 for i.MX35 */
26+ #define USBPHYCTRL_OTGBASE_OFFSET 0x608
27+ #define USBPHYCTRL_EVDO (1 << 23)
28+
2529int fsl_udc_clk_init (struct platform_device * pdev )
2630{
2731 struct fsl_usb2_platform_data * pdata ;
@@ -84,6 +88,17 @@ int fsl_udc_clk_init(struct platform_device *pdev)
8488void fsl_udc_clk_finalize (struct platform_device * pdev )
8589{
8690 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
87102
88103 /* ULPI transceivers don't need usbpll */
89104 if (pdata -> phy_mode == FSL_USB2_PHY_ULPI ) {
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ struct fsl_usb2_platform_data {
6666 enum fsl_usb2_operating_modes operating_mode ;
6767 enum fsl_usb2_phy_modes phy_mode ;
6868 unsigned int port_enables ;
69+ unsigned int workaround ;
6970
7071 int (* init )(struct platform_device * );
7172 void (* exit )(struct platform_device * );
@@ -84,6 +85,8 @@ struct fsl_usb2_platform_data {
8485#define FSL_USB2_PORT0_ENABLED 0x00000001
8586#define FSL_USB2_PORT1_ENABLED 0x00000002
8687
88+ #define FLS_USB2_WORKAROUND_ENGCM09152 (1 << 0)
89+
8790struct spi_device ;
8891
8992struct fsl_spi_platform_data {
You can’t perform that action at this time.
0 commit comments