debug feature: jtagtcpip, improved performance
authorØyvind Harboe <oyvind.harboe@zylin.com>
Fri, 16 Jul 2010 08:51:14 +0000 (10:51 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Fri, 16 Jul 2010 10:18:35 +0000 (12:18 +0200)
only check error flag when rclk is actually enabled.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/jtag/zy1000/zy1000.c

index 013d8658a7ec6bd55fe02f293d2900005b48f639..a1104ef4f31832bf7ae22b41d20080f57463eaf2 100644 (file)
 
 #endif
 
+
+/* The software needs to check if it's in RCLK mode or not */
+static bool zy1000_rclk = false;
+
 static int zy1000_khz(int khz, int *jtag_speed)
 {
        if (khz == 0)
@@ -222,11 +226,13 @@ int zy1000_speed(int speed)
        /* flush JTAG master FIFO before setting speed */
        waitIdle();
 
+       zy1000_rclk = false;
+
        if (speed == 0)
        {
                /*0 means RCLK*/
-               speed = 0;
                ZY1000_POKE(ZY1000_JTAG_BASE + 0x10, 0x100);
+               zy1000_rclk = true;
                LOG_DEBUG("jtag_speed using RCLK");
        }
        else
@@ -456,17 +462,24 @@ int interface_jtag_execute_queue(void)
        uint32_t empty;
 
        waitIdle();
-       ZY1000_PEEK(ZY1000_JTAG_BASE + 0x10, empty);
-       /* clear JTAG error register */
-       ZY1000_POKE(ZY1000_JTAG_BASE + 0x14, 0x400);
 
-       if ((empty&0x400) != 0)
+       if (zy1000_rclk)
        {
-               LOG_WARNING("RCLK timeout");
-               /* the error is informative only as we don't want to break the firmware if there
-                * is a false positive.
+               /* Only check for errors when using RCLK to speed up
+                * jtag over TCP/IP
                 */
-//             return ERROR_FAIL;
+               ZY1000_PEEK(ZY1000_JTAG_BASE + 0x10, empty);
+               /* clear JTAG error register */
+               ZY1000_POKE(ZY1000_JTAG_BASE + 0x14, 0x400);
+
+               if ((empty&0x400) != 0)
+               {
+                       LOG_WARNING("RCLK timeout");
+                       /* the error is informative only as we don't want to break the firmware if there
+                        * is a false positive.
+                        */
+       //              return ERROR_FAIL;
+               }
        }
        return ERROR_OK;
 }

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)