summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/usb/arcotg_dcd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/drivers/usb/arcotg_dcd.c b/firmware/drivers/usb/arcotg_dcd.c
index 0674342eb9..fe8ae803c0 100644
--- a/firmware/drivers/usb/arcotg_dcd.c
+++ b/firmware/drivers/usb/arcotg_dcd.c
@@ -488,13 +488,15 @@ static void reset_int(void)
488 488
489 UDC_ENDPTFLUSH = ~0; 489 UDC_ENDPTFLUSH = ~0;
490 490
491 if ((UDC_PORTSC1 & (1 << 8)) == 0) { 491 if ((UDC_PORTSC1 & PORTSCX_PORT_RESET) == 0) {
492 logf("TIMEOUT->port"); 492 logf("TIMEOUT->port");
493 } 493 }
494 494
495 UDC_USBSTS = (1 << 6); 495 /* clear USB Reset status bit */
496 UDC_USBSTS = USB_STS_RESET;
496 497
497 while ((UDC_USBSTS & (1 << 2)) == 0) { /* wait for port change */ 498 /* wait for port change */
499 while ((UDC_USBSTS & USB_STS_PORT_CHANGE) == 0) {
498 if (timer_expired(&t)) { 500 if (timer_expired(&t)) {
499 logf("TIMEOUT->portchange"); 501 logf("TIMEOUT->portchange");
500 } 502 }