if (dwc->dis_u3_susphy_quirk)
reg &= ~DWC3_GUSB3PIPECTL_SUSPHY;
+ if (dwc->dis_del_phy_power_chg_quirk)
+ reg &= ~DWC3_GUSB3PIPECTL_DEPOCHANGE;
+
dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
goto err4;
}
+ switch (dwc->dr_mode) {
+ case USB_DR_MODE_PERIPHERAL:
+ dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_DEVICE);
+ break;
+ case USB_DR_MODE_HOST:
+ dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_HOST);
+ break;
+ default:
+ dev_dbg(dwc->dev, "Unsupported mode %d\n", dwc->dr_mode);
+ break;
+ }
+
return 0;
err4:
"snps,lfps_filter_quirk");
dwc->rx_detect_poll_quirk = device_property_read_bool(dev,
"snps,rx_detect_poll_quirk");
+ dwc->dis_u3_autosuspend_quirk = device_property_read_bool(dev,
+ "snps,dis-u3-autosuspend-quirk");
dwc->dis_u3_susphy_quirk = device_property_read_bool(dev,
"snps,dis_u3_susphy_quirk");
dwc->dis_u2_susphy_quirk = device_property_read_bool(dev,
"snps,dis_rxdet_inp3_quirk");
dwc->dis_u2_freeclk_exists_quirk = device_property_read_bool(dev,
"snps,dis-u2-freeclk-exists-quirk");
+ dwc->dis_del_phy_power_chg_quirk = device_property_read_bool(dev,
+ "snps,dis-del-phy-power-chg-quirk");
+ dwc->xhci_slow_suspend_quirk = device_property_read_bool(dev,
+ "snps,xhci-slow-suspend-quirk");
dwc->tx_de_emphasis_quirk = device_property_read_bool(dev,
"snps,tx_de_emphasis_quirk");
struct dwc3 *dwc = dev_get_drvdata(dev);
int ret;
+ if (pm_runtime_suspended(dwc->dev))
+ return 0;
+
ret = dwc3_suspend_common(dwc);
if (ret)
return ret;
struct dwc3 *dwc = dev_get_drvdata(dev);
int ret;
+ if (pm_runtime_suspended(dwc->dev))
+ return 0;
+
pinctrl_pm_select_default_state(dev);
ret = dwc3_resume_common(dwc);