Explorar el Código

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>
Minas Harutyunyan hace 8 años
padre
commit
307bc11fcd
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      drivers/usb/dwc2/gadget.c

+ 3 - 0
drivers/usb/dwc2/gadget.c

@@ -3573,6 +3573,9 @@ irq_retry:
 		/* Report disconnection if it is not already done. */
 		/* Report disconnection if it is not already done. */
 		dwc2_hsotg_disconnect(hsotg);
 		dwc2_hsotg_disconnect(hsotg);
 
 
+		/* Reset device address to zero */
+		__bic32(hsotg->regs + DCFG, DCFG_DEVADDR_MASK);
+
 		if (usb_status & GOTGCTL_BSESVLD && connected)
 		if (usb_status & GOTGCTL_BSESVLD && connected)
 			dwc2_hsotg_core_init_disconnected(hsotg, true);
 			dwc2_hsotg_core_init_disconnected(hsotg, true);
 	}
 	}