summaryrefslogtreecommitdiff
path: root/src/jtag/ft2232.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jtag/ft2232.c')
-rw-r--r--src/jtag/ft2232.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c
index b4415983..5a8a44e3 100644
--- a/src/jtag/ft2232.c
+++ b/src/jtag/ft2232.c
@@ -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)