|
@@ -474,6 +474,7 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
|
|
|
{
|
|
|
u32 cfg;
|
|
|
int ret;
|
|
|
+ u32 reg;
|
|
|
|
|
|
dwc->start_config_issued = false;
|
|
|
cfg = le16_to_cpu(ctrl->wValue);
|
|
@@ -488,6 +489,14 @@ static int dwc3_ep0_set_config(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)
|
|
|
/* if the cfg matches and the cfg is non zero */
|
|
|
if (cfg && (!ret || (ret == USB_GADGET_DELAYED_STATUS))) {
|
|
|
dwc->dev_state = DWC3_CONFIGURED_STATE;
|
|
|
+ /*
|
|
|
+ * Enable transition to U1/U2 state when
|
|
|
+ * nothing is pending from application.
|
|
|
+ */
|
|
|
+ reg = dwc3_readl(dwc->regs, DWC3_DCTL);
|
|
|
+ reg |= (DWC3_DCTL_ACCEPTU1ENA | DWC3_DCTL_ACCEPTU2ENA);
|
|
|
+ dwc3_writel(dwc->regs, DWC3_DCTL, reg);
|
|
|
+
|
|
|
dwc->resize_fifos = true;
|
|
|
dev_dbg(dwc->dev, "resize fifos flag SET\n");
|
|
|
}
|