Committed 1997.
--
Øyvind Harboe
Embedded software and hardware consulting services
http://consulting.zylin.com
### Eclipse Workspace Patch 1.0
#P openocd
Index: src/jtag/usbprog.c
===================================================================
--- src/jtag/usbprog.c (revision 1996)
+++ src/jtag/usbprog.c (working copy)
@@ -150,16 +150,14 @@
#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 @@
#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: src/jtag/bitbang.c
===================================================================
--- src/jtag/bitbang.c (revision 1996)
+++ src/jtag/bitbang.c (working copy)
@@ -268,8 +268,7 @@
#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 @@
#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 @@
#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: src/jtag/gw16012.c
===================================================================
--- src/jtag/gw16012.c (revision 1996)
+++ src/jtag/gw16012.c (working copy)
@@ -369,16 +369,14 @@
#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 @@
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: src/jtag/amt_jtagaccel.c
===================================================================
--- src/jtag/amt_jtagaccel.c (revision 1996)
+++ src/jtag/amt_jtagaccel.c (working copy)
@@ -347,24 +347,21 @@
#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: src/jtag/jlink.c
===================================================================
--- src/jtag/jlink.c (revision 1996)
+++ src/jtag/jlink.c (working copy)
@@ -157,8 +157,7 @@
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 @@
{
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 @@
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: src/jtag/ft2232.c
===================================================================
--- src/jtag/ft2232.c (revision 1996)
+++ src/jtag/ft2232.c (working copy)
@@ -1428,9 +1428,9 @@
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 @@
/* 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 @@
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 @@
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 @@
}
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: src/jtag/arm-jtag-ew.c
===================================================================
--- src/jtag/arm-jtag-ew.c (revision 1996)
+++ src/jtag/arm-jtag-ew.c (working copy)
@@ -138,20 +138,14 @@
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 @@
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: src/jtag/vsllink.c
===================================================================
--- src/jtag/vsllink.c (revision 1996)
+++ src/jtag/vsllink.c (working copy)
@@ -301,20 +301,14 @@
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 @@
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)
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development