diff options
| author | Simon Glass <[email protected]> | 2023-05-05 20:03:04 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-05-13 09:52:32 -0400 |
| commit | 8c29b73278d66c029b98caecba81831ef6dc472a (patch) | |
| tree | e6aabd26acd9f7bd57733251c26137a248d57749 /test/boot/bootdev.c | |
| parent | 9fea3a799dde140f2d75eeb4560a5c3237ca991d (diff) | |
bootstd: usb: Avoid initing USB twice
This causes crashes on some boards, e.g. rockpro64. In any case, we
should not do it.
Check the usb_started flag to avoid this.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Jonas Karlman <[email protected]>
Tested-by: Tom Rini <[email protected]>
Diffstat (limited to 'test/boot/bootdev.c')
| -rw-r--r-- | test/boot/bootdev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index 606bf4fcc1c..6b29213416d 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -306,6 +306,7 @@ static int bootdev_test_hunter(struct unit_test_state *uts) { struct bootstd_priv *std; + usb_started = false; test_set_skip_delays(true); /* get access to the used hunters */ @@ -346,6 +347,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) struct bootstd_priv *std; test_set_skip_delays(true); + usb_started = false; /* get access to the used hunters */ ut_assertok(bootstd_get_priv(&std)); @@ -474,6 +476,7 @@ BOOTSTD_TEST(bootdev_test_bootable, UT_TESTF_DM | UT_TESTF_SCAN_FDT); /* Check hunting for bootdev of a particular priority */ static int bootdev_test_hunt_prio(struct unit_test_state *uts) { + usb_started = false; test_set_skip_delays(true); console_record_reset_enable(); @@ -502,6 +505,8 @@ static int bootdev_test_hunt_label(struct unit_test_state *uts) struct bootstd_priv *std; int mflags; + usb_started = false; + /* get access to the used hunters */ ut_assertok(bootstd_get_priv(&std)); |
