diff options
Diffstat (limited to 'utils/hwstub/stub/usb_drv_arc.c')
-rw-r--r-- | utils/hwstub/stub/usb_drv_arc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/hwstub/stub/usb_drv_arc.c b/utils/hwstub/stub/usb_drv_arc.c index 32275b6adb..ab87be8a4c 100644 --- a/utils/hwstub/stub/usb_drv_arc.c +++ b/utils/hwstub/stub/usb_drv_arc.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "usb_drv.h" | 23 | #include "usb_drv.h" |
24 | #include "config.h" | 24 | #include "config.h" |
25 | #include "memory.h" | 25 | #include "memory.h" |
26 | #include "target.h" | ||
26 | 27 | ||
27 | #define MAX_PKT_SIZE 1024 | 28 | #define MAX_PKT_SIZE 1024 |
28 | #define MAX_PKT_SIZE_EP0 64 | 29 | #define MAX_PKT_SIZE_EP0 64 |
@@ -323,9 +324,11 @@ void usb_drv_init(void) | |||
323 | /* we don't know if USB was connected or not. In USB recovery mode it will | 324 | /* we don't know if USB was connected or not. In USB recovery mode it will |
324 | * but in other cases it might not be. In doubt, disconnect */ | 325 | * but in other cases it might not be. In doubt, disconnect */ |
325 | REG_USBCMD &= ~USBCMD_RUN; | 326 | REG_USBCMD &= ~USBCMD_RUN; |
327 | /* wait a short time for the host to realise */ | ||
328 | target_mdelay(50); | ||
326 | /* reset the controller */ | 329 | /* reset the controller */ |
327 | REG_USBCMD |= USBCMD_CTRL_RESET; | 330 | REG_USBCMD |= USBCMD_CTRL_RESET; |
328 | while (REG_USBCMD & USBCMD_CTRL_RESET); | 331 | while(REG_USBCMD & USBCMD_CTRL_RESET); |
329 | /* put it in device mode */ | 332 | /* put it in device mode */ |
330 | REG_USBMODE = USBMODE_CTRL_MODE_DEVICE; | 333 | REG_USBMODE = USBMODE_CTRL_MODE_DEVICE; |
331 | /* reset address */ | 334 | /* reset address */ |