fix a bug in usb host resume
authoryangkai <yangkai@ubuntu-fs>
Thu, 24 Mar 2011 02:39:08 +0000 (10:39 +0800)
committeryangkai <yangkai@ubuntu-fs>
Thu, 24 Mar 2011 02:39:08 +0000 (10:39 +0800)
drivers/usb/dwc_otg/dwc_otg_driver.c
drivers/usb/dwc_otg/dwc_otg_hcd.c

index 18586f38bfa6bdc891cb2cc46a88c293fe85560b..ebc3e3c750877c8cdfbeb1afd43d27ff5921aefb 100755 (executable)
@@ -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
index cd49d0788ad43b61154a6d22f0d11ed75087da6f..edc5cf074bcd6405896988410aec9386a984b00e 100755 (executable)
@@ -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;
 }