Relax polling check if not in JTAG mode 43/2143/3
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Wed, 14 May 2014 20:14:10 +0000 (22:14 +0200)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sat, 28 Jun 2014 09:34:55 +0000 (09:34 +0000)
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>
src/jtag/core.c
src/target/adi_v5_swd.c

index 24f6a511d7a0f5f8911b2d06f91f98008ea7edc4..f82b05e1e36a4890109964dfddd8489ef75237b4 100644 (file)
@@ -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.
         */
         * 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);
        if (!jtag_poll || jtag_trst != 0)
                return false;
        return jtag_srst == 0 || (jtag_reset_config & RESET_SRST_NO_GATING);
index f08b0be0e8b3fe0b0c82d5858c1d51d3b4a854a0..f8d3650edb6894e42795f90f666a4e4384ece0f4 100644 (file)
@@ -429,9 +429,6 @@ static int swd_init(struct command_context *ctx)
        if (status == ERROR_OK)
                LOG_INFO("SWD IDCODE %#8.8" PRIx32, idcode);
 
        if (status == ERROR_OK)
                LOG_INFO("SWD IDCODE %#8.8" PRIx32, idcode);
 
-       /* this is a workaround to get polling working */
-       jtag_add_reset(0, 0);
-
        return status;
 }
 
        return status;
 }
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)