aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jtag/core.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 5d5803a..9f1e4cf 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1549,7 +1549,17 @@ int jtag_init_reset(struct command_context *cmd_ctx)
if ((jtag_reset_config & RESET_SRST_PULLS_TRST) == 0)
jtag_add_reset(0, 1);
}
- jtag_add_reset(0, 0);
+
+ /* some targets enable us to connect with srst asserted */
+ if (jtag_reset_config & RESET_CNCT_UNDER_SRST) {
+ if (jtag_reset_config & RESET_SRST_NO_GATING)
+ jtag_add_reset(0, 1);
+ else {
+ LOG_WARNING("\'srst_nogate\' reset_config option is required");
+ jtag_add_reset(0, 0);
+ }
+ } else
+ jtag_add_reset(0, 0);
retval = jtag_execute_queue();
if (retval != ERROR_OK)
return retval;
@@ -1572,6 +1582,14 @@ int jtag_init(struct command_context *cmd_ctx)
/* guard against oddball hardware: force resets to be inactive */
jtag_add_reset(0, 0);
+
+ /* some targets enable us to connect with srst asserted */
+ if (jtag_reset_config & RESET_CNCT_UNDER_SRST) {
+ if (jtag_reset_config & RESET_SRST_NO_GATING)
+ jtag_add_reset(0, 1);
+ else
+ LOG_WARNING("\'srst_nogate\' reset_config option is required");
+ }
retval = jtag_execute_queue();
if (retval != ERROR_OK)
return retval;