summaryrefslogtreecommitdiff
path: root/src/jtag/jtag.h
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-31 19:39:05 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-31 19:39:05 +0000
commitafe5371bc8bde3fc1a833c3d7e459920711a9584 (patch)
tree78600edd255a9cdfca9035ebe392f4b343bd8558 /src/jtag/jtag.h
parent86d3e744641ef670f4376e47589afac37d9a87ab (diff)
downloadopenocd_libswd-afe5371bc8bde3fc1a833c3d7e459920711a9584.tar.gz
openocd_libswd-afe5371bc8bde3fc1a833c3d7e459920711a9584.tar.bz2
openocd_libswd-afe5371bc8bde3fc1a833c3d7e459920711a9584.tar.xz
openocd_libswd-afe5371bc8bde3fc1a833c3d7e459920711a9584.zip
Do not assert trst in srst_only case even if srst_pulls_trst.
git-svn-id: svn://svn.berlios.de/openocd/trunk@530 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.h')
-rw-r--r--src/jtag/jtag.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 2c186e9c..114e6aa3 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -308,13 +308,32 @@ extern int interface_jtag_add_pathmove(int num_states, enum tap_state *path);
*/
extern void jtag_add_runtest(int num_cycles, enum tap_state endstate);
extern int interface_jtag_add_runtest(int num_cycles, enum tap_state endstate);
-/* Invoking jtag_add_reset() with unsupported combinations is
- * not allowed and constitutes a bug in the calling code.
+/* A reset of the TAP state machine can be requested.
*
- * trst & srst must be 0 or 1. There is no way to
- * read the current reset state.
+ * Whether tms or trst reset is used depends on the capabilities of
+ * the target and jtag interface(reset_config command configures this).
+ *
+ * srst can driver a reset of the TAP state machine and vice
+ * versa
+ *
+ * Application code may need to examine value of jtag_reset_config
+ * to determine the proper codepath
+ *
+ * DANGER! Even though srst drives trst, trst might not be connected to
+ * the interface, and it might actually be *harmful* to assert trst in this case.
+ *
+ * This is why combinations such as "reset_config srst_only srst_pulls_trst"
+ * are supported.
+ *
+ */
+extern void jtag_add_reset(int req_tms_or_trst, int srst);
+/* this drives the actual srst and trst pins. srst will always be 0
+ * if jtag_reset_config & RESET_SRST_PULLS_TRST != 0 and ditto for
+ * trst.
+ *
+ * the higher level jtag_add_reset will invoke jtag_add_tms() if
+ * approperiate
*/
-extern void jtag_add_reset(int trst, int srst);
extern int interface_jtag_add_reset(int trst, int srst);
extern void jtag_add_end_state(enum tap_state endstate);
extern int interface_jtag_add_end_state(enum tap_state endstate);