diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-07-02 14:04:39 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2018-07-02 14:04:39 +1000 |
commit | 1463a90ed354df022120d81e9f25e19cc037cba3 (patch) | |
tree | f9ddf201e457baf420da9ff518e29ac78a1c1c7c /cf-fsi-test.c | |
parent | 55d8672de0b729acbf5377464cd2dfe2c76412cd (diff) | |
download | cf-fsi-1463a90ed354df022120d81e9f25e19cc037cba3.tar.gz cf-fsi-1463a90ed354df022120d81e9f25e19cc037cba3.zip |
Dummy clocks can return errors
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'cf-fsi-test.c')
-rw-r--r-- | cf-fsi-test.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cf-fsi-test.c b/cf-fsi-test.c index ad6efd7..b3065f1 100644 --- a/cf-fsi-test.c +++ b/cf-fsi-test.c @@ -832,12 +832,17 @@ int test_break(void) return do_command(CMD_BREAK); } -void dummy_clocks(int count) +int dummy_clocks(int count) { + int rc; + while(count > 0) { - do_command(CMD_IDLE_CLOCKS | (100 << 8)); + rc = do_command(CMD_IDLE_CLOCKS | (100 << 8)); + if (rc) + return rc; count -= 100; } + return 0; } int test_rw(uint32_t addr, bool is_write, uint32_t *data) |