|
From: openocd-gerrit <ope...@us...> - 2023-05-25 16:19:53
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 5924d9f30cd68333d37caa7ac8cad43f036148dc (commit)
from 4defa3b1e323b7f7287d8e046b2c97ad4a749f87 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5924d9f30cd68333d37caa7ac8cad43f036148dc
Author: Amaury Pouly <ama...@lo...>
Date: Wed May 17 12:09:32 2023 +0100
target/riscv-013: clear sticky error when DMI operation fails
When a DMI operation does not succeed (either because of a timeout
or an error), the specification says that the error in the `op`
field is sticky and needs to cleared by writing `dmireset` in `dtmcs`.
This is already done for timeouts in increase_dmi_busy_delay
but not for errors.
Change-Id: I7c5f27a5cf145511a1a8b64a45a586521e1cbe41
Signed-off-by: Amaury Pouly <ama...@lo...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7688
Tested-by: jenkins
Reviewed-by: Tim Newsome <ti...@si...>
Reviewed-by: Jan Matyas <jan...@co...>
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 4e6c8dc36..2f4a8fe2e 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -598,6 +598,7 @@ static int dmi_op_timeout(struct target *target, uint32_t *data_in,
break;
} else {
LOG_ERROR("failed %s at 0x%x, status=%d", op_name, address, status);
+ dtmcontrol_scan(target, DTM_DTMCS_DMIRESET);
return ERROR_FAIL;
}
if (time(NULL) - start > timeout_sec)
@@ -630,6 +631,7 @@ static int dmi_op_timeout(struct target *target, uint32_t *data_in,
LOG_ERROR("Failed %s (NOP) at 0x%x; status=%d", op_name, address,
status);
}
+ dtmcontrol_scan(target, DTM_DTMCS_DMIRESET);
return ERROR_FAIL;
}
if (time(NULL) - start > timeout_sec)
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/riscv-013.c | 2 ++
1 file changed, 2 insertions(+)
hooks/post-receive
--
Main OpenOCD repository
|