rk: restore file mode
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc_otg_310 / dwc_otg_cil.c
index fc347d04615ba00b0e762bd6ff754625b02ac506..411064697d37779d5e04584bd90594e7915c6d65 100755 (executable)
@@ -2262,9 +2262,9 @@ void dwc_otg_core_dev_init(dwc_otg_core_if_t *core_if)
                                    DWC_READ_REG32(&core_if->
                                                   dev_if->out_ep_regs[i]->
                                                   doepint);
-                               if (j == 100000) {
+                               if (j++ >= 10000) {
                                        DWC_ERROR
-                                           ("EPDIS was not set during 10s\n");
+                                           ("EPDIS was not set during 1s\n");
                                        break;
                                }
                        } while (!doepint.b.epdisabled);
@@ -2395,6 +2395,8 @@ void dwc_otg_disable_host_interrupts(dwc_otg_core_if_t *core_if)
        intr_mask.b.nptxfempty = 1;
 
        DWC_MODIFY_REG32(&global_regs->gintmsk, intr_mask.d32, 0);
+       /* Clear pending interrupts */
+       DWC_WRITE_REG32(&global_regs->gintsts, intr_mask.d32);
 }
 
 /**