bootstd: Create a function to reset USB
Set up a function for this, since it needs to be used from multiple test
files.
This test file is only used on sandbox, where USB is enabled, so drop
the local declaration of usb_started
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/boot/bootstd_common.c b/test/boot/bootstd_common.c
index e505395..ff8ed23 100644
--- a/test/boot/bootstd_common.c
+++ b/test/boot/bootstd_common.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <memalign.h>
#include <mmc.h>
+#include <usb.h>
#include <linux/log2.h>
#include <test/suites.h>
#include <test/ut.h>
@@ -88,6 +89,11 @@
return 0;
}
+void bootstd_reset_usb(void)
+{
+ usb_started = false;
+}
+
int do_ut_bootstd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct unit_test *tests = UNIT_TEST_SUITE_START(bootstd_test);