summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/state.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-11-08 23:47:43 -0700
committerSimon Glass <sjg@chromium.org>2015-11-19 20:27:50 -0700
commit9723563aa821e9c9b881dfe6a082f6301ca69826 (patch)
tree78f9a58eab57b388dbadc8e453513b6dae42e989 /arch/sandbox/cpu/state.c
parent3f51a772d4b7dccc2d379762a03535408b602e54 (diff)
downloadu-boot-imx-9723563aa821e9c9b881dfe6a082f6301ca69826.zip
u-boot-imx-9723563aa821e9c9b881dfe6a082f6301ca69826.tar.gz
u-boot-imx-9723563aa821e9c9b881dfe6a082f6301ca69826.tar.bz2
sandbox: Add a way to skip time delays
Some tests are slow due to delays which are unnecessary on sandbox. The worst offender is USB where we lose two seconds. Add a way to disable time delays. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/cpu/state.c')
-rw-r--r--arch/sandbox/cpu/state.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index 7e5d03e..d2a7dc9 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -337,6 +337,20 @@ struct sandbox_state *state_get_current(void)
return state;
}
+void state_set_skip_delays(bool skip_delays)
+{
+ struct sandbox_state *state = state_get_current();
+
+ state->skip_delays = skip_delays;
+}
+
+bool state_get_skip_delays(void)
+{
+ struct sandbox_state *state = state_get_current();
+
+ return state->skip_delays;
+}
+
int state_init(void)
{
state = &main_state;