diff options
author | Simon Glass <sjg@chromium.org> | 2015-11-08 23:47:43 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-11-19 20:27:50 -0700 |
commit | 9723563aa821e9c9b881dfe6a082f6301ca69826 (patch) | |
tree | 78f9a58eab57b388dbadc8e453513b6dae42e989 /arch/sandbox/cpu/cpu.c | |
parent | 3f51a772d4b7dccc2d379762a03535408b602e54 (diff) | |
download | talos-obmc-uboot-9723563aa821e9c9b881dfe6a082f6301ca69826.tar.gz talos-obmc-uboot-9723563aa821e9c9b881dfe6a082f6301ca69826.zip |
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/cpu.c')
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index 3a7f5a004b..196f3e1191 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -37,7 +37,10 @@ void sandbox_exit(void) /* delay x useconds */ void __udelay(unsigned long usec) { - os_usleep(usec); + struct sandbox_state *state = state_get_current(); + + if (!state->skip_delays) + os_usleep(usec); } int cleanup_before_linux(void) |