From 757fc50d21ab41c66299969c1e2bfe7caa77d349 Mon Sep 17 00:00:00 2001 From: yangkai Date: Thu, 24 Mar 2011 10:39:08 +0800 Subject: [PATCH] fix a bug in usb host resume --- drivers/usb/dwc_otg/dwc_otg_driver.c | 4 ++-- drivers/usb/dwc_otg/dwc_otg_hcd.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc_otg/dwc_otg_driver.c b/drivers/usb/dwc_otg/dwc_otg_driver.c index 18586f38bfa6..ebc3e3c75087 100755 --- a/drivers/usb/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/dwc_otg/dwc_otg_driver.c @@ -1231,8 +1231,8 @@ static int dwc_otg_driver_suspend(struct platform_device *_dev , pm_message_t st rk28_usb_suspend(0); del_timer(&otg_dev->pcd->check_vbus_timer); - DWC_PRINT("CRU_CLKGATE1_CON: 0x%08x\n",dwc_read_reg32((uint32_t *)(SCU_BASE_ADDR_VA+0x60))); - DWC_PRINT("USB_PHY_CON1: 0x%08x\n",dwc_read_reg32((uint32_t *)(USB_GRF_CON))); + //DWC_PRINT("CRU_CLKGATE1_CON: 0x%08x\n",dwc_read_reg32((uint32_t *)(SCU_BASE_ADDR_VA+0x60))); + //DWC_PRINT("USB_PHY_CON1: 0x%08x\n",dwc_read_reg32((uint32_t *)(USB_GRF_CON))); return 0; } #else diff --git a/drivers/usb/dwc_otg/dwc_otg_hcd.c b/drivers/usb/dwc_otg/dwc_otg_hcd.c index cd49d0788ad4..edc5cf074bcd 100755 --- a/drivers/usb/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/dwc_otg/dwc_otg_hcd.c @@ -165,11 +165,9 @@ static int dwc_otg_hcd_resume(struct usb_hcd *hcd) hprt0.b.prtconndet = 1; dwc_write_reg32(core_if->host_if->hprt0, hprt0.d32); - hprt0.d32 = dwc_read_reg32(core_if->host_if->hprt0); + //hprt0.d32 = dwc_read_reg32(core_if->host_if->hprt0); //DWC_PRINT("%s, HPRT0:0x%x\n",hcd->self.bus_name,hprt0.d32); - gintmsk.b.portintr = 1; - dwc_write_reg32(&core_if->core_global_regs->gintmsk, gintmsk.d32); mdelay(10); } else @@ -178,6 +176,8 @@ static int dwc_otg_hcd_resume(struct usb_hcd *hcd) core_if->hcd_cb->suspend( core_if->hcd_cb->p, 1); } } + gintmsk.b.portintr = 1; + dwc_write_reg32(&core_if->core_global_regs->gintmsk, gintmsk.d32); return 0; } -- 2.34.1