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: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
019808f97c
commit
095fdef081
@ -93,6 +93,17 @@ int usb_stop(void)
|
||||
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_hub_reset();
|
||||
usb_started = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user