aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2018-01-10 15:30:56 -0800
committerGitHub <noreply@github.com>2018-01-10 15:30:56 -0800
commit6f9585068f3d3a6e94d89406051412d12c9c22e9 (patch)
treec32fa742240c110ff303381b58bf6bf678a51cd0
parent0d60a29c21e1bbc3f57faaac527263ebced06c92 (diff)
parent33aad3524bdfb31e155805adf25522fa8955a5f1 (diff)
downloadriscv-openocd-6f9585068f3d3a6e94d89406051412d12c9c22e9.zip
riscv-openocd-6f9585068f3d3a6e94d89406051412d12c9c22e9.tar.gz
riscv-openocd-6f9585068f3d3a6e94d89406051412d12c9c22e9.tar.bz2
Merge pull request #172 from riscv/dbus_read_comment
Add a comment in dbus_read
-rw-r--r--src/target/riscv/riscv-011.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c
index f455921..c3be0d1 100644
--- a/src/target/riscv/riscv-011.c
+++ b/src/target/riscv/riscv-011.c
@@ -455,7 +455,12 @@ static uint64_t dbus_read(struct target *target, uint16_t address)
uint64_t value;
dbus_status_t status;
uint16_t address_in;
-
+
+ /* If the previous read/write was to the same address, we will get the read data
+ * from the previous access.
+ * While somewhat nonintuitive, this is an efficient way to get the data.
+ */
+
unsigned i = 0;
do {
status = dbus_scan(target, &address_in, &value, DBUS_OP_READ, address, 0);