adjust usb phy suspend timing
authoryangkai <yangkai@ubuntu-fs>
Fri, 18 Feb 2011 08:28:20 +0000 (16:28 +0800)
committeryangkai <yangkai@ubuntu-fs>
Fri, 18 Feb 2011 08:28:20 +0000 (16:28 +0800)
drivers/usb/dwc_otg/dwc_otg_driver.c
drivers/usb/dwc_otg/dwc_otg_hcd.c
drivers/usb/dwc_otg/dwc_otg_pcd.c

index 54cd562390d9bf59a64e6cab2867370582a22dfb..9aa650cb432196230e1f7afcd8ddd02c3b67066d 100755 (executable)
@@ -364,6 +364,7 @@ static ssize_t dwc_otg_enable_store( struct device *_dev,
         if (_core_if->hcd_cb && _core_if->hcd_cb->suspend) {
                 _core_if->hcd_cb->suspend( _core_if->hcd_cb->p, val);
         }
+        udelay(3);
         clk_disable(otg_dev->phyclk);
         clk_disable(otg_dev->ahbclk);
        }
@@ -956,6 +957,7 @@ static __devinit int dwc_otg_driver_probe(struct platform_device *pdev)
        
     *otg_phy_con1 = regval;
     
+    udelay(3);
     clk_disable(phyclk);
     clk_disable(ahbclk);
 #endif
@@ -983,7 +985,7 @@ static __devinit int dwc_otg_driver_probe(struct platform_device *pdev)
     regval |= (0x01<<13);    // software control
 
     *otg_phy_con1 = regval;
-    
+    udelay(3);
     clk_disable(phyclk);
     clk_disable(ahbclk);
 #endif
index 5271b33000ae054cc0658876ebf1eb5b1c3bcd42..cd49d0788ad43b61154a6d22f0d11ed75087da6f 100755 (executable)
@@ -104,7 +104,7 @@ static int dwc_otg_hcd_suspend(struct usb_hcd *hcd)
                 core_if->hcd_cb->suspend( core_if->hcd_cb->p, 0);
         }
     }
-    udelay(1);
+    udelay(3);
     clk_disable(core_if->otg_dev->phyclk);
     clk_disable(core_if->otg_dev->ahbclk);
     //power off
index 1ade6b05a809a32d7d26e85f175dd6e231d3fa27..e6733894e4f5f95dd3d09c627897bd3bf051db2c 100755 (executable)
@@ -1552,7 +1552,7 @@ int rk28_usb_suspend( int exitsuspend )
         pcd->phy_suspend = 1;
         *otg_phy_con1 |= (0x01<<2);
         *otg_phy_con1 &= ~(0x01<<3);    // enter suspend.
-        udelay(1);
+        udelay(3);
         clk_disable(pcd->otg_dev->phyclk);
         clk_disable(pcd->otg_dev->ahbclk);
         //*otg_phy_con1 &= ~(0x01<<2);