diff options
author | Tim Newsome <tim@sifive.com> | 2019-12-18 14:19:18 -0800 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2019-12-18 14:19:18 -0800 |
commit | 06c596e19f2c16c65a78f37eb227f93f0e99970f (patch) | |
tree | 1a028f52352d80eb688d4c0b1f7de8bf088c2a43 | |
parent | 8a9df230ad6cb6ac6a57e0668ffee11bd4988416 (diff) | |
download | riscv-openocd-busy.zip riscv-openocd-busy.tar.gz riscv-openocd-busy.tar.bz2 |
Rename ERROR_BUSY to ERROR_TARGET_BUSY.busy
ERROR_BUSY is already defined somewhere in Windows land.
Change-Id: I91e6f5b6448ce38a2a38598b7261a40bd2488ec5
-rw-r--r-- | src/helper/log.h | 2 | ||||
-rw-r--r-- | src/target/riscv/riscv-013.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/helper/log.h b/src/helper/log.h index 2122d81..acc8aed 100644 --- a/src/helper/log.h +++ b/src/helper/log.h @@ -151,7 +151,7 @@ extern int debug_level; #define ERROR_WAIT (-5) /* ERROR_TIMEOUT is already taken by winerror.h. */ #define ERROR_TIMEOUT_REACHED (-6) -#define ERROR_BUSY (-7) +#define ERROR_TARGET_BUSY (-7) #endif /* OPENOCD_HELPER_LOG_H */ diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 0602fb3..115f767 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -610,7 +610,7 @@ static int dmi_op_timeout(struct target *target, uint32_t *data_in, /* The scan where we should have gotten the read value * returned busy. It's anybody's guess whether the read * actually happened or not. */ - return ERROR_BUSY; + return ERROR_TARGET_BUSY; } } else if (status == DMI_STATUS_SUCCESS) { break; @@ -2312,7 +2312,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address, i++) { int result = read_memory_bus_word(target, address + i * size, size, buffer + i * size); - if (result == ERROR_BUSY) { + if (result == ERROR_TARGET_BUSY) { busy = true; break; } else if (result != ERROR_OK) { @@ -2337,7 +2337,7 @@ static int read_memory_bus_v1(struct target *target, target_addr_t address, !get_field(sbcs_read, DMI_SBCS_SBBUSYERROR)) { int result = read_memory_bus_word(target, address + (count - 1) * size, size, buffer + (count - 1) * size); - if (result == ERROR_BUSY) + if (result == ERROR_TARGET_BUSY) busy = true; else if (result != ERROR_OK) return result; |