Remove unused code, TAP_INVALID is never passed to drivers.

git-svn-id: svn://svn.berlios.de/openocd/trunk@1997 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe 2009-06-02 07:21:44 +00:00
parent a372074d21
commit 8dab0ecf23
8 changed files with 27 additions and 66 deletions

View File

@ -347,7 +347,6 @@ static int amt_jtagaccel_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state); LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state);
#endif #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); amt_jtagaccel_runtest(cmd->cmd.runtest->num_cycles);
break; break;
@ -355,7 +354,6 @@ static int amt_jtagaccel_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state);
#endif #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(); amt_jtagaccel_state_move();
break; break;
@ -363,7 +361,6 @@ static int amt_jtagaccel_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("scan end in %i", cmd->cmd.scan->end_state); LOG_DEBUG("scan end in %i", cmd->cmd.scan->end_state);
#endif #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); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
type = jtag_scan_type(cmd->cmd.scan); type = jtag_scan_type(cmd->cmd.scan);

View 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, \ DEBUG_JTAG_IO( "runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, \
cmd->cmd.runtest->end_state); 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); armjtagew_runtest(cmd->cmd.runtest->num_cycles);
break; break;
case JTAG_STATEMOVE: case JTAG_STATEMOVE:
DEBUG_JTAG_IO("statemove end in %i", cmd->cmd.statemove->end_state); 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(); armjtagew_state_move();
break; break;
@ -166,10 +160,7 @@ static int armjtagew_execute_queue(void)
case JTAG_SCAN: case JTAG_SCAN:
DEBUG_JTAG_IO("scan end in %i", cmd->cmd.scan->end_state); 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); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
DEBUG_JTAG_IO("scan input, length = %d", scan_size); DEBUG_JTAG_IO("scan input, length = %d", scan_size);

View File

@ -268,7 +268,6 @@ int bitbang_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #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) ); LOG_DEBUG("runtest %i cycles, end in %s", cmd->cmd.runtest->num_cycles, tap_state_name(cmd->cmd.runtest->end_state) );
#endif #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); bitbang_runtest(cmd->cmd.runtest->num_cycles);
break; break;
@ -284,7 +283,6 @@ int bitbang_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("statemove end in %s", tap_state_name(cmd->cmd.statemove->end_state)); LOG_DEBUG("statemove end in %s", tap_state_name(cmd->cmd.statemove->end_state));
#endif #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); bitbang_state_move(0);
break; break;
@ -299,7 +297,6 @@ int bitbang_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #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) ); LOG_DEBUG("%s scan end in %s", (cmd->cmd.scan->ir_scan) ? "IR" : "DR", tap_state_name(cmd->cmd.scan->end_state) );
#endif #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); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
type = jtag_scan_type(cmd->cmd.scan); type = jtag_scan_type(cmd->cmd.scan);

View File

@ -1428,9 +1428,9 @@ static int ft2232_execute_runtest(jtag_command_t *cmd)
if (tap_get_state() != TAP_IDLE) if (tap_get_state() != TAP_IDLE)
predicted_size += 3; predicted_size += 3;
predicted_size += 3 * CEIL(cmd->cmd.runtest->num_cycles, 7); 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; 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; predicted_size += 3;
if (ft2232_buffer_size + predicted_size + 1 > FT2232_BUFFER_SIZE) if (ft2232_buffer_size + predicted_size + 1 > FT2232_BUFFER_SIZE)
{ {
@ -1463,7 +1463,6 @@ static int ft2232_execute_runtest(jtag_command_t *cmd)
/* LOG_DEBUG("added TMS scan (no read)"); */ /* 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() ) if ( tap_get_state() != tap_get_end_state() )
@ -1496,7 +1495,6 @@ static int ft2232_execute_statemove(jtag_command_t *cmd)
require_send = 0; require_send = 0;
first_unsent = cmd; 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 */ /* move to end state */
@ -1563,7 +1561,6 @@ static int ft2232_execute_scan(jtag_command_t *cmd)
retval = ERROR_JTAG_QUEUE_FAILED; retval = ERROR_JTAG_QUEUE_FAILED;
/* current command */ /* 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); ft2232_large_scan(cmd->cmd.scan, type, buffer, scan_size);
require_send = 0; require_send = 0;
@ -1584,7 +1581,6 @@ static int ft2232_execute_scan(jtag_command_t *cmd)
} }
ft2232_expect_read += ft2232_predict_scan_in(scan_size, type); ft2232_expect_read += ft2232_predict_scan_in(scan_size, type);
/* LOG_DEBUG("new read size: %i", ft2232_expect_read); */ /* 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); ft2232_add_scan(cmd->cmd.scan->ir_scan, type, buffer, scan_size);
require_send = 1; require_send = 1;

View File

@ -369,7 +369,6 @@ static int gw16012_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state); LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state);
#endif #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); gw16012_runtest(cmd->cmd.runtest->num_cycles);
break; break;
@ -377,7 +376,6 @@ static int gw16012_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state);
#endif #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(); gw16012_state_move();
break; break;
@ -388,7 +386,6 @@ static int gw16012_execute_queue(void)
gw16012_path_move(cmd->cmd.pathmove); gw16012_path_move(cmd->cmd.pathmove);
break; break;
case JTAG_SCAN: 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); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
type = jtag_scan_type(cmd->cmd.scan); type = jtag_scan_type(cmd->cmd.scan);

View File

@ -157,7 +157,6 @@ static void jlink_execute_runtest(jtag_command_t *cmd)
cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->num_cycles,
cmd->cmd.runtest->end_state); 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); 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); 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(); jlink_state_move();
} }
@ -192,7 +188,6 @@ static void jlink_execute_scan(jtag_command_t *cmd)
DEBUG_JTAG_IO("scan end in %s", tap_state_name(cmd->cmd.scan->end_state)); 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); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);

View File

@ -150,7 +150,6 @@ static int usbprog_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state); LOG_DEBUG("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, cmd->cmd.runtest->end_state);
#endif #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); usbprog_runtest(cmd->cmd.runtest->num_cycles);
break; break;
@ -158,7 +157,6 @@ static int usbprog_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state);
#endif #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(); usbprog_state_move();
break; break;
@ -173,7 +171,6 @@ static int usbprog_execute_queue(void)
#ifdef _DEBUG_JTAG_IO_ #ifdef _DEBUG_JTAG_IO_
LOG_DEBUG("scan end in %i", cmd->cmd.scan->end_state); LOG_DEBUG("scan end in %i", cmd->cmd.scan->end_state);
#endif #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); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
type = jtag_scan_type(cmd->cmd.scan); type = jtag_scan_type(cmd->cmd.scan);

View 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, \ DEBUG_JTAG_IO( "runtest %i cycles, end in %s", cmd->cmd.runtest->num_cycles, \
tap_state_name(cmd->cmd.runtest->end_state)); 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); vsllink_runtest(cmd->cmd.runtest->num_cycles);
break; break;
case JTAG_STATEMOVE: case JTAG_STATEMOVE:
DEBUG_JTAG_IO("statemove end in %s", tap_state_name(cmd->cmd.statemove->end_state)); 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(); vsllink_state_move();
break; break;
@ -327,10 +321,7 @@ static int vsllink_execute_queue(void)
break; break;
case JTAG_SCAN: 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); scan_size = jtag_build_buffer(cmd->cmd.scan, &buffer);
if (cmd->cmd.scan->ir_scan) if (cmd->cmd.scan->ir_scan)