diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2014-05-14 22:14:10 +0200 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2014-06-28 09:34:55 +0000 |
commit | 12e9f6292b391d475214704843504c5817bf783e (patch) | |
tree | ddbb551b8b728492d3e97c09ce379913151aa740 /src/jtag | |
parent | baf998b9f8d17f4318b21336d5b57145fc4d44bc (diff) |
Relax polling check if not in JTAG mode
Polling was disabled based on global variables jtag_trst and jtag_srst
which were never touched in non-JTAG mode. Modify the check and remove
the ugly workaround to avoid calls to a possibly uninitialized JTAG
subsystem.
Change-Id: I3b18c81e0fba7aaf35afe6f08c3fe8fa6f8443fd
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2143
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/jtag')
-rw-r--r-- | src/jtag/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c index 24f6a511..f82b05e1 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -166,6 +166,9 @@ bool is_jtag_poll_safe(void) * It is also implicitly disabled while TRST is active and * while SRST is gating the JTAG clock. */ + if (!transport_is_jtag()) + return jtag_poll; + if (!jtag_poll || jtag_trst != 0) return false; return jtag_srst == 0 || (jtag_reset_config & RESET_SRST_NO_GATING); |