Skip to content
Snippets Groups Projects
Commit 095fdef0 authored by Simon Glass's avatar Simon Glass
Browse files

dm: usb: sandbox: Reset emulation devices in usb stop()


These devices must have their addresses removed ready for the next USB
bus enumeration. Add this logic to usb_stop().

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarMarek Vasut <marex@denx.de>
parent 019808f9
No related branches found
No related tags found
No related merge requests found
...@@ -93,6 +93,17 @@ int usb_stop(void) ...@@ -93,6 +93,17 @@ int usb_stop(void)
err = ret; err = ret;
} }
#ifdef CONFIG_SANDBOX
struct udevice *dev;
/* Reset all enulation devices */
ret = uclass_get(UCLASS_USB_EMUL, &uc);
if (ret)
return ret;
uclass_foreach_dev(dev, uc)
usb_emul_reset(dev);
#endif
usb_stor_reset(); usb_stor_reset();
usb_hub_reset(); usb_hub_reset();
usb_started = 0; usb_started = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment