summaryrefslogtreecommitdiff
path: root/src/xsvf
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-03-01 20:00:59 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-03-08 08:12:25 +0100
commite018c7c1d29e8dabb9b4a90bb9eb3574eb1668bb (patch)
treee89d52d68c83186556ef6ae3ad6c82032fe26642 /src/xsvf
parentf7d1be714b91fcc12e56c8fa78c702e75a733019 (diff)
downloadopenocd+libswd-e018c7c1d29e8dabb9b4a90bb9eb3574eb1668bb.tar.gz
openocd+libswd-e018c7c1d29e8dabb9b4a90bb9eb3574eb1668bb.tar.bz2
openocd+libswd-e018c7c1d29e8dabb9b4a90bb9eb3574eb1668bb.tar.xz
openocd+libswd-e018c7c1d29e8dabb9b4a90bb9eb3574eb1668bb.zip
jtag: retire tap field
jtag_add_dr/ir_scan() now takes the tap as the first argument, rather than for each of the fields passed in. The code never exercised the path where there was more than one tap being scanned, who knows if it even worked. This simplifies the implementation and reduces clutter in the calling code. use jtag_add_ir/dr_plain_scan() for more fancy situations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/xsvf')
-rw-r--r--src/xsvf/xsvf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c
index 539fbdc6..faa55421 100644
--- a/src/xsvf/xsvf.c
+++ b/src/xsvf/xsvf.c
@@ -476,7 +476,6 @@ COMMAND_HANDLER(handle_xsvf_command)
LOG_USER("%s mismatch, xsdrsize=%d retry=%d", op_name, xsdrsize, attempt);
}
- field.tap = tap;
field.num_bits = xsdrsize;
field.out_value = dr_out_buf;
field.in_value = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
@@ -484,7 +483,7 @@ COMMAND_HANDLER(handle_xsvf_command)
if (tap == NULL)
jtag_add_plain_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
else
- jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(tap, 1, &field, jtag_set_end_state(TAP_DRPAUSE));
jtag_check_value_mask(&field, dr_in_buf, dr_in_mask);
@@ -694,7 +693,6 @@ COMMAND_HANDLER(handle_xsvf_command)
{
struct scan_field field;
- field.tap = tap;
field.num_bits = bitcount;
field.out_value = ir_buf;
@@ -706,7 +704,7 @@ COMMAND_HANDLER(handle_xsvf_command)
if (tap == NULL)
jtag_add_plain_ir_scan(1, &field, my_end_state);
else
- jtag_add_ir_scan(1, &field, my_end_state);
+ jtag_add_ir_scan(tap, 1, &field, my_end_state);
if (xruntest)
{
@@ -930,7 +928,6 @@ COMMAND_HANDLER(handle_xsvf_command)
jtag_add_clocks(loop_clocks);
jtag_add_sleep(loop_usecs);
- field.tap = tap;
field.num_bits = xsdrsize;
field.out_value = dr_out_buf;
field.in_value = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
@@ -941,7 +938,7 @@ COMMAND_HANDLER(handle_xsvf_command)
if (tap == NULL)
jtag_add_plain_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
else
- jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(tap, 1, &field, jtag_set_end_state(TAP_DRPAUSE));
jtag_check_value_mask(&field, dr_in_buf, dr_in_mask);