diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-17 20:48:02 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-24 02:11:41 +0300 |
commit | 081bdc52c158dd3a4f73910cde3d7e70a5932d56 (patch) | |
tree | 9698094a3e2a36c06e054c17d9e820d0cb11017f /arch/sandbox/cpu | |
parent | 22061d3d2ad10e1c67e36282a8c97f505a62c252 (diff) | |
download | u-boot-081bdc52c158dd3a4f73910cde3d7e70a5932d56.tar.xz |
sandbox: Allow SPI flash bootdevs to be disabled for tests
Most tests don't want these and they can create a lot of noise. Add a way
to disable them. Use that in tests, with a flag provided to enable them
for tests that need this feature.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r-- | arch/sandbox/cpu/state.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 267f280df1..69da378ab5 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -460,6 +460,20 @@ bool sandbox_eth_enabled(void) return !state->disable_eth; } +void sandbox_sf_set_enable_bootdevs(bool enable) +{ + struct sandbox_state *state = state_get_current(); + + state->disable_sf_bootdevs = !enable; +} + +bool sandbox_sf_bootdev_enabled(void) +{ + struct sandbox_state *state = state_get_current(); + + return !state->disable_sf_bootdevs; +} + int state_init(void) { state = &main_state; |