summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorMinas Harutyunyan <Minas.Harutyunyan@synopsys.com>2017-07-11 14:25:13 +0400
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-07-18 08:57:36 +0300
commit307bc11fcdf9f911a1adacf9e77fe1c490041ee3 (patch)
tree74e7b4b25e9f019832576b3c13e019af431cfdb8 /drivers/usb
parent4a71fcb8ac5f94c07bf47a43b13258a52e4fe3ad (diff)
usb: dwc2: gadget: On USB RESET reset device address to zero
Reseted DEVADDR field in DCFG to zero on USB RESET. Device address in DCFG register does not reset to zero, which required to pass enumeration, after disconnect and reconnect. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Minas Harutyunyan <hminas@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc2/gadget.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index bc3b3fda5000..c4066cd77e47 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3573,6 +3573,9 @@ irq_retry:
/* Report disconnection if it is not already done. */
dwc2_hsotg_disconnect(hsotg);
+ /* Reset device address to zero */
+ __bic32(hsotg->regs + DCFG, DCFG_DEVADDR_MASK);
+
if (usb_status & GOTGCTL_BSESVLD && connected)
dwc2_hsotg_core_init_disconnected(hsotg, true);
}