Remove unused code, TAP_INVALID is never passed to drivers.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 07:21:44 +0000 (07:21 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 07:21:44 +0000 (07:21 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1997 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/amt_jtagaccel.c
src/jtag/arm-jtag-ew.c
src/jtag/bitbang.c
src/jtag/ft2232.c
src/jtag/gw16012.c
src/jtag/jlink.c
src/jtag/usbprog.c
src/jtag/vsllink.c

index df44da004f3e2960a2069540d7ef9862228f7395..694a4a7c75bbaae97dab760c2a58ed56695bec26 100644 (file)
@@ -347,24 +347,21 @@ static int amt_jtagaccel_execute_queue(void)
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state);
 #endif
-                               if (cmd->cmd.runtest->end_state != TAP_INVALID)
-                                       amt_jtagaccel_end_state(cmd->cmd.runtest->end_state);
+                               amt_jtagaccel_end_state(cmd->cmd.runtest->end_state);
                                amt_jtagaccel_runtest(cmd->cmd.runtest->num_cycles);
                                break;
                        case JTAG_STATEMOVE:
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state);
 #endif
-                               if (cmd->cmd.statemove->end_state != TAP_INVALID)
-                                       amt_jtagaccel_end_state(cmd->cmd.statemove->end_state);
+                               amt_jtagaccel_end_state(cmd->cmd.statemove->end_state);
                                amt_jtagaccel_state_move();
                                break;
                        case JTAG_SCAN:
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("scan end in %i", cmd->cmd.scan->end_state);
 #endif
-                               if (cmd->cmd.scan->end_state != TAP_INVALID)
-                                       amt_jtagaccel_end_state(cmd->cmd.scan->end_state);
+                               amt_jtagaccel_end_state(cmd->cmd.scan->end_state);
                                scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
                                type = jtag_scan_type(cmd->cmd.scan);
                                amt_jtagaccel_scan(cmd->cmd.scan->ir_scan, type, buffer, scan_size);
index a997956cacfd368fd82c60b29c53e19f6685adec..4dc854ac13d77a929c8d8f33776a91ee052ecae4 100644 (file)
@@ -138,20 +138,14 @@ static int armjtagew_execute_queue(void)
                                DEBUG_JTAG_IO( "runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, \
                                        cmd->cmd.runtest->end_state);
 
-                               if (cmd->cmd.runtest->end_state != TAP_INVALID)
-                               {
-                                       armjtagew_end_state(cmd->cmd.runtest->end_state);
-                               }
+                               armjtagew_end_state(cmd->cmd.runtest->end_state);
                                armjtagew_runtest(cmd->cmd.runtest->num_cycles);
                                break;
 
                        case JTAG_STATEMOVE:
                                DEBUG_JTAG_IO("statemove end in %i", cmd->cmd.statemove->end_state);
 
-                               if (cmd->cmd.statemove->end_state != TAP_INVALID)
-                               {
-                                       armjtagew_end_state(cmd->cmd.statemove->end_state);
-                               }
+                               armjtagew_end_state(cmd->cmd.statemove->end_state);
                                armjtagew_state_move();
                                break;
 
@@ -166,10 +160,7 @@ static int armjtagew_execute_queue(void)
                        case JTAG_SCAN:
                                DEBUG_JTAG_IO("scan end in %i", cmd->cmd.scan->end_state);
 
-                               if (cmd->cmd.scan->end_state != TAP_INVALID)
-                               {
-                                       armjtagew_end_state(cmd->cmd.scan->end_state);
-                               }
+                               armjtagew_end_state(cmd->cmd.scan->end_state);
 
                                scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
                                DEBUG_JTAG_IO("scan input, length = %d", scan_size);
index 9d50dcc8db35b98a3e042a1c3e4f2e2ff22fa479..ae07a903b1ccd11613d5d61ead6cad15dd99a41a 100644 (file)
@@ -268,8 +268,7 @@ int bitbang_execute_queue(void)
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("runtest %i cycles, end in %s", cmd->cmd.runtest->num_cycles, tap_state_name(cmd->cmd.runtest->end_state) );
 #endif
-                               if (cmd->cmd.runtest->end_state != TAP_INVALID)
-                                       bitbang_end_state(cmd->cmd.runtest->end_state);
+                               bitbang_end_state(cmd->cmd.runtest->end_state);
                                bitbang_runtest(cmd->cmd.runtest->num_cycles);
                                break;
 
@@ -284,8 +283,7 @@ int bitbang_execute_queue(void)
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("statemove end in %s", tap_state_name(cmd->cmd.statemove->end_state));
 #endif
-                               if (cmd->cmd.statemove->end_state != TAP_INVALID)
-                                       bitbang_end_state(cmd->cmd.statemove->end_state);
+                               bitbang_end_state(cmd->cmd.statemove->end_state);
                                bitbang_state_move(0);
                                break;
                        case JTAG_PATHMOVE:
@@ -299,8 +297,7 @@ int bitbang_execute_queue(void)
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("%s scan end in %s",  (cmd->cmd.scan->ir_scan) ? "IR" : "DR", tap_state_name(cmd->cmd.scan->end_state) );
 #endif
-                               if (cmd->cmd.scan->end_state != TAP_INVALID)
-                                       bitbang_end_state(cmd->cmd.scan->end_state);
+                               bitbang_end_state(cmd->cmd.scan->end_state);
                                scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
                                type = jtag_scan_type(cmd->cmd.scan);
                                bitbang_scan(cmd->cmd.scan->ir_scan, type, buffer, scan_size);
index b4415983f96f8aa0771ce2afe37d8fcde2c13569..5a8a44e387cee3c9eeb40988ee491e4cf33410af 100644 (file)
@@ -1428,9 +1428,9 @@ static int ft2232_execute_runtest(jtag_command_t *cmd)
        if (tap_get_state() != TAP_IDLE)
                predicted_size += 3;
        predicted_size += 3 * CEIL(cmd->cmd.runtest->num_cycles, 7);
-       if ( (cmd->cmd.runtest->end_state != TAP_INVALID) && (cmd->cmd.runtest->end_state != TAP_IDLE) )
+       if ( cmd->cmd.runtest->end_state != TAP_IDLE)
                predicted_size += 3;
-       if ( (cmd->cmd.runtest->end_state == TAP_INVALID) && (tap_get_end_state() != TAP_IDLE) )
+       if ( tap_get_end_state() != TAP_IDLE)
                predicted_size += 3;
        if (ft2232_buffer_size + predicted_size + 1 > FT2232_BUFFER_SIZE)
        {
@@ -1463,8 +1463,7 @@ static int ft2232_execute_runtest(jtag_command_t *cmd)
                /* LOG_DEBUG("added TMS scan (no read)"); */
        }
 
-       if (cmd->cmd.runtest->end_state != TAP_INVALID)
-               ft2232_end_state(cmd->cmd.runtest->end_state);
+       ft2232_end_state(cmd->cmd.runtest->end_state);
 
        if ( tap_get_state() != tap_get_end_state() )
        {
@@ -1496,8 +1495,7 @@ static int ft2232_execute_statemove(jtag_command_t *cmd)
                require_send = 0;
                first_unsent = cmd;
        }
-       if (cmd->cmd.statemove->end_state != TAP_INVALID)
-               ft2232_end_state(cmd->cmd.statemove->end_state);
+       ft2232_end_state(cmd->cmd.statemove->end_state);
 
        /* move to end state */
        if ( tap_get_state() != tap_get_end_state() )
@@ -1563,8 +1561,7 @@ static int ft2232_execute_scan(jtag_command_t *cmd)
                                retval = ERROR_JTAG_QUEUE_FAILED;
 
                /* current command */
-               if (cmd->cmd.scan->end_state != TAP_INVALID)
-                       ft2232_end_state(cmd->cmd.scan->end_state);
+               ft2232_end_state(cmd->cmd.scan->end_state);
                ft2232_large_scan(cmd->cmd.scan, type, buffer, scan_size);
                require_send = 0;
                first_unsent = cmd->next;
@@ -1584,8 +1581,7 @@ static int ft2232_execute_scan(jtag_command_t *cmd)
        }
        ft2232_expect_read += ft2232_predict_scan_in(scan_size, type);
        /* LOG_DEBUG("new read size: %i", ft2232_expect_read); */
-       if (cmd->cmd.scan->end_state != TAP_INVALID)
-               ft2232_end_state(cmd->cmd.scan->end_state);
+       ft2232_end_state(cmd->cmd.scan->end_state);
        ft2232_add_scan(cmd->cmd.scan->ir_scan, type, buffer, scan_size);
        require_send = 1;
        if (buffer)
index 8d59e25dd45e41cd183cb098cca55c02cb9b53c5..ddb8a4f96c538b327a25a68810d04ad9a9b60514 100644 (file)
@@ -369,16 +369,14 @@ static int gw16012_execute_queue(void)
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state);
 #endif
-                               if (cmd->cmd.runtest->end_state != TAP_INVALID)
-                                       gw16012_end_state(cmd->cmd.runtest->end_state);
+                               gw16012_end_state(cmd->cmd.runtest->end_state);
                                gw16012_runtest(cmd->cmd.runtest->num_cycles);
                                break;
                        case JTAG_STATEMOVE:
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state);
 #endif
-                               if (cmd->cmd.statemove->end_state != TAP_INVALID)
-                                       gw16012_end_state(cmd->cmd.statemove->end_state);
+                               gw16012_end_state(cmd->cmd.statemove->end_state);
                                gw16012_state_move();
                                break;
                        case JTAG_PATHMOVE:
@@ -388,8 +386,7 @@ static int gw16012_execute_queue(void)
                                gw16012_path_move(cmd->cmd.pathmove);
                                break;
                        case JTAG_SCAN:
-                               if (cmd->cmd.scan->end_state != TAP_INVALID)
-                                       gw16012_end_state(cmd->cmd.scan->end_state);
+                               gw16012_end_state(cmd->cmd.scan->end_state);
                                scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
                                type = jtag_scan_type(cmd->cmd.scan);
 #ifdef _DEBUG_JTAG_IO_
index accc6b5f9adc02c69520dadad63037460f873219..b677535ce1a903b250ea29a0f7fdacca129cc875 100644 (file)
@@ -157,8 +157,7 @@ static void jlink_execute_runtest(jtag_command_t *cmd)
                        cmd->cmd.runtest->num_cycles,
                        cmd->cmd.runtest->end_state);
 
-       if (cmd->cmd.runtest->end_state != TAP_INVALID)
-               jlink_end_state(cmd->cmd.runtest->end_state);
+       jlink_end_state(cmd->cmd.runtest->end_state);
 
        jlink_runtest(cmd->cmd.runtest->num_cycles);
 }
@@ -167,10 +166,7 @@ static void jlink_execute_statemove(jtag_command_t *cmd)
 {
        DEBUG_JTAG_IO("statemove end in %i", cmd->cmd.statemove->end_state);
 
-       if (cmd->cmd.statemove->end_state != TAP_INVALID)
-       {
-               jlink_end_state(cmd->cmd.statemove->end_state);
-       }
+       jlink_end_state(cmd->cmd.statemove->end_state);
        jlink_state_move();
 }
 
@@ -192,8 +188,7 @@ static void jlink_execute_scan(jtag_command_t *cmd)
 
        DEBUG_JTAG_IO("scan end in %s", tap_state_name(cmd->cmd.scan->end_state));
 
-       if (cmd->cmd.scan->end_state != TAP_INVALID)
-               jlink_end_state(cmd->cmd.scan->end_state);
+       jlink_end_state(cmd->cmd.scan->end_state);
 
        scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
        DEBUG_JTAG_IO("scan input, length = %d", scan_size);
index 7e843901fe7fbdf0bf2afe708285488c9eafeb22..6281715cc2d81b166b45e6983f653b54ec1a6aa9 100644 (file)
@@ -150,16 +150,14 @@ static int usbprog_execute_queue(void)
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state);
 #endif
-                               if (cmd->cmd.runtest->end_state != TAP_INVALID)
-                                       usbprog_end_state(cmd->cmd.runtest->end_state);
+                               usbprog_end_state(cmd->cmd.runtest->end_state);
                                usbprog_runtest(cmd->cmd.runtest->num_cycles);
                                break;
                        case JTAG_STATEMOVE:
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state);
 #endif
-                               if (cmd->cmd.statemove->end_state != TAP_INVALID)
-                                       usbprog_end_state(cmd->cmd.statemove->end_state);
+                               usbprog_end_state(cmd->cmd.statemove->end_state);
                                usbprog_state_move();
                                break;
                        case JTAG_PATHMOVE:
@@ -173,8 +171,7 @@ static int usbprog_execute_queue(void)
 #ifdef _DEBUG_JTAG_IO_
                                LOG_DEBUG("scan end in %i", cmd->cmd.scan->end_state);
 #endif
-                               if (cmd->cmd.scan->end_state != TAP_INVALID)
-                                       usbprog_end_state(cmd->cmd.scan->end_state);
+                               usbprog_end_state(cmd->cmd.scan->end_state);
                                scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
                                type = jtag_scan_type(cmd->cmd.scan);
                                usbprog_scan(cmd->cmd.scan->ir_scan, type, buffer, scan_size);
index b3a475b0461ffd2c202e35543af958211e93137d..4af92e0f3059bee266f88125204b56437aca7f93 100644 (file)
@@ -301,20 +301,14 @@ static int vsllink_execute_queue(void)
                                DEBUG_JTAG_IO( "runtest %i cycles, end in %s", cmd->cmd.runtest->num_cycles, \
                                        tap_state_name(cmd->cmd.runtest->end_state));
                                        
-                               if (cmd->cmd.runtest->end_state != TAP_INVALID)
-                               {
-                                       vsllink_end_state(cmd->cmd.runtest->end_state);
-                               }
+                               vsllink_end_state(cmd->cmd.runtest->end_state);
                                vsllink_runtest(cmd->cmd.runtest->num_cycles);
                                break;
                                
                        case JTAG_STATEMOVE:
                                DEBUG_JTAG_IO("statemove end in %s", tap_state_name(cmd->cmd.statemove->end_state));
                                
-                               if (cmd->cmd.statemove->end_state != TAP_INVALID)
-                               {
-                                       vsllink_end_state(cmd->cmd.statemove->end_state);
-                               }
+                               vsllink_end_state(cmd->cmd.statemove->end_state);
                                vsllink_state_move();
                                break;
                                
@@ -327,10 +321,7 @@ static int vsllink_execute_queue(void)
                                break;
                                
                        case JTAG_SCAN:
-                               if (cmd->cmd.scan->end_state != TAP_INVALID)
-                               {
-                                       vsllink_end_state(cmd->cmd.scan->end_state);
-                               }
+                               vsllink_end_state(cmd->cmd.scan->end_state);
                                
                                scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
                                if (cmd->cmd.scan->ir_scan)

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)