summaryrefslogtreecommitdiff
path: root/test/boot/bootstd_common.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-09-01 16:26:16 -0600
committerTom Rini <[email protected]>2024-09-18 13:00:59 -0600
commita3fab7d1fb5d8daf762c9d6bfae3069f742c579e (patch)
treef9b7a813afff204889ea0a15267ae2e88f36dafc /test/boot/bootstd_common.c
parent13a29ec40c12b1035042058f0c2ba2bf083c512c (diff)
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 <[email protected]>
Diffstat (limited to 'test/boot/bootstd_common.c')
-rw-r--r--test/boot/bootstd_common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/boot/bootstd_common.c b/test/boot/bootstd_common.c
index e50539500a0..ff8ed2303b3 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 @@ int bootstd_test_check_mmc_hunter(struct unit_test_state *uts)
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);