diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-03-16 14:13:03 +0100 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-03-18 08:43:19 +0100 |
commit | 36df240cea04990e8c18aa0b90bd63374f22dbd3 (patch) | |
tree | 5e8573d7c54222bacf2389880e659b100e3754e2 /src/pld | |
parent | fccdfc1cd78ddfb687e0d1fc630c3fa10af2b5f9 (diff) | |
download | openocd+libswd-36df240cea04990e8c18aa0b90bd63374f22dbd3.tar.gz openocd+libswd-36df240cea04990e8c18aa0b90bd63374f22dbd3.tar.bz2 openocd+libswd-36df240cea04990e8c18aa0b90bd63374f22dbd3.tar.xz openocd+libswd-36df240cea04990e8c18aa0b90bd63374f22dbd3.zip |
jtag: cut down on usage of unintended modification of global end state
jtag_get/set_end_state() is now deprecated.
There were lots of places in the code where the end state was
unintentionally modified.
The big Q is whether there were any places where the intention
was to modify the end state. 0.5 is a long way off, so we'll
get a fair amount of testing.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/pld')
-rw-r--r-- | src/pld/virtex2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c index 976535b4..93509dec 100644 --- a/src/pld/virtex2.c +++ b/src/pld/virtex2.c @@ -40,7 +40,7 @@ static int virtex2_set_instr(struct jtag_tap *tap, uint32_t new_instr) buf_set_u32(field.out_value, 0, field.num_bits, new_instr); field.in_value = NULL; - jtag_add_ir_scan(tap, &field, jtag_set_end_state(TAP_IDLE)); + jtag_add_ir_scan(tap, &field, TAP_IDLE); free(field.out_value); } @@ -67,7 +67,7 @@ static int virtex2_send_32(struct pld_device *pld_device, virtex2_set_instr(virtex2_info->tap, 0x5); /* CFG_IN */ - jtag_add_dr_scan(virtex2_info->tap, 1, &scan_field, jtag_set_end_state(TAP_DRPAUSE)); + jtag_add_dr_scan(virtex2_info->tap, 1, &scan_field, TAP_DRPAUSE); free(values); @@ -96,7 +96,7 @@ static int virtex2_receive_32(struct pld_device *pld_device, { scan_field.in_value = (uint8_t *)words; - jtag_add_dr_scan(virtex2_info->tap, 1, &scan_field, jtag_set_end_state(TAP_DRPAUSE)); + jtag_add_dr_scan(virtex2_info->tap, 1, &scan_field, TAP_DRPAUSE); jtag_add_callback(virtexflip32, (jtag_callback_data_t)words); @@ -155,18 +155,18 @@ static int virtex2_load(struct pld_device *pld_device, const char *filename) field.num_bits = bit_file.length * 8; field.out_value = bit_file.data; - jtag_add_dr_scan(virtex2_info->tap, 1, &field, jtag_set_end_state(TAP_DRPAUSE)); + jtag_add_dr_scan(virtex2_info->tap, 1, &field, TAP_DRPAUSE); jtag_execute_queue(); jtag_add_tlr(); jtag_set_end_state(TAP_IDLE); virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */ - jtag_add_runtest(13, jtag_set_end_state(TAP_IDLE)); + jtag_add_runtest(13, TAP_IDLE); virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */ virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */ virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */ - jtag_add_runtest(13, jtag_set_end_state(TAP_IDLE)); + jtag_add_runtest(13, TAP_IDLE); virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */ jtag_execute_queue(); |