From 33aad3524bdfb31e155805adf25522fa8955a5f1 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Thu, 4 Jan 2018 13:27:35 -0800 Subject: Add a comment in dbus_read This just comments the current behavior --- src/target/riscv/riscv-011.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c index 18e31c7..db7622e 100644 --- a/src/target/riscv/riscv-011.c +++ b/src/target/riscv/riscv-011.c @@ -454,7 +454,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); -- cgit v1.1