gr->pcgcctl_local = DWC_READ_REG32(core_if->pcgcctl);
gr->gdfifocfg_local =
DWC_READ_REG32(&core_if->core_global_regs->gdfifocfg);
- for (i = 0; i < MAX_EPS_CHANNELS; i++) {
+ for (i = 0; i < MAX_EPS_CHANNELS - 1; i++) {
gr->dtxfsiz_local[i] =
DWC_READ_REG32(&(core_if->core_global_regs->dtxfsiz[i]));
}
gr->hptxfsiz_local);
DWC_WRITE_REG32(&core_if->core_global_regs->gdfifocfg,
gr->gdfifocfg_local);
- for (i = 0; i < MAX_EPS_CHANNELS; i++)
+ for (i = 0; i < MAX_EPS_CHANNELS - 1; i++)
DWC_WRITE_REG32(&core_if->core_global_regs->dtxfsiz[i],
gr->dtxfsiz_local[i]);
dwc_udelay(10);
/* Load restore values for [31:14] bits and set EssRegRestored bit */
- pcgcctl.d32 = ((gr->pcgcctl_local | 0xffffc000) & 0xffffc000);
+ pcgcctl.d32 = 0xffffc000;
pcgcctl.b.ess_reg_restored = 1;
if (rmode)
pcgcctl.b.restoremode = 1;
if (++count > 10000)
break;
}
- DWC_ASSERT(++count < 10000,
+ ++count;
+ DWC_ASSERT(count < 10000,
"Connection id status change timed out");
core_if->op_state = B_PERIPHERAL;
DWC_PRINTF("DEVICE mode\n");
if (++count > 10000)
break;
}
- DWC_ASSERT(++count < 10000,
+ ++count;
+ DWC_ASSERT(count < 10000,
"Connection id status change timed out");
core_if->op_state = A_HOST;
DWC_PRINTF("HOST mode\n");
*/
if (halt_status == DWC_OTG_HC_XFER_STALL)
qh->data_toggle = DWC_OTG_HC_PID_DATA0;
- else {
- if (qtd)
- dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
- }
+ else
+ dwc_otg_hcd_save_data_toggle(hc, hc_regs, qtd);
}
if (halt_status == DWC_OTG_HC_XFER_COMPLETE) {