From 2ffa3f3382d3fba2cd12c49477aef1c70dcb4c09 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 3 Jan 2018 12:34:52 -0800 Subject: [PATCH] Comment busy behavior. Change-Id: I95e4a70eea636a41f0206b738b1b991d4a3e9249 --- src/target/riscv/riscv-011.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c index f4aadae56..f7f2e8cf3 100644 --- a/src/target/riscv/riscv-011.c +++ b/src/target/riscv/riscv-011.c @@ -455,6 +455,9 @@ static uint64_t dbus_read(struct target *target, uint16_t address) dbus_status_t status; uint16_t address_in; + /* Assume dbus is idle and there aren't any busy/error states pending. + * If there happens to be a busy state pending, we will clear it after we + * discover it as part of the NOP scan. */ for (unsigned i = 0; i < 256; i++) { dbus_scan(target, NULL, NULL, DBUS_OP_READ, address, 0); status = dbus_scan(target, &address_in, &value, DBUS_OP_NOP, address, 0);