From 6ce4f3567bb597a7762cf62a45ed6311aa24639a Mon Sep 17 00:00:00 2001 From: yangkai Date: Fri, 18 Feb 2011 16:28:20 +0800 Subject: [PATCH] adjust usb phy suspend timing --- drivers/usb/dwc_otg/dwc_otg_driver.c | 4 +++- drivers/usb/dwc_otg/dwc_otg_hcd.c | 2 +- drivers/usb/dwc_otg/dwc_otg_pcd.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc_otg/dwc_otg_driver.c b/drivers/usb/dwc_otg/dwc_otg_driver.c index 54cd562390d9..9aa650cb4321 100755 --- a/drivers/usb/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/dwc_otg/dwc_otg_driver.c @@ -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 diff --git a/drivers/usb/dwc_otg/dwc_otg_hcd.c b/drivers/usb/dwc_otg/dwc_otg_hcd.c index 5271b33000ae..cd49d0788ad4 100755 --- a/drivers/usb/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/dwc_otg/dwc_otg_hcd.c @@ -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 diff --git a/drivers/usb/dwc_otg/dwc_otg_pcd.c b/drivers/usb/dwc_otg/dwc_otg_pcd.c index 1ade6b05a809..e6733894e4f5 100755 --- a/drivers/usb/dwc_otg/dwc_otg_pcd.c +++ b/drivers/usb/dwc_otg/dwc_otg_pcd.c @@ -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); -- 2.34.1