/* Do core a soft reset of the core. Be careful with this because it resets all the internal state machines of the core.  */
static void dwc_otg_core_reset(struct dwc2_core_regs *regs)
/* Do core a soft reset of the core. Be careful with this because it resets all the internal state machines of the core.  */
static void dwc_otg_core_reset(struct dwc2_core_regs *regs)
{
	int ret;
	ret = wait_for_bit_le32(&regs->grstctl, DWC2_GRSTCTL_AHBIDLE,
				true, 1000, false);
	if (ret)
		dev_info(dev, "%s: Timeout!\n", __func__);
	writel(DWC2_GRSTCTL_CSFTRST, &regs->grstctl);
	ret = wait_for_bit_le32(&regs->grstctl, DWC2_GRSTCTL_CSFTRST,
				false, 1000, false);
	if (ret)
		dev_info(dev, "%s: Timeout!\n", __func__);
	mdelay(100);
}