summaryrefslogtreecommitdiff
path: root/src/target/etb.c
diff options
context:
space:
mode:
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
commit36df240cea04990e8c18aa0b90bd63374f22dbd3 (patch)
tree5e8573d7c54222bacf2389880e659b100e3754e2 /src/target/etb.c
parentfccdfc1cd78ddfb687e0d1fc630c3fa10af2b5f9 (diff)
downloadopenocd+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/target/etb.c')
-rw-r--r--src/target/etb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/target/etb.c b/src/target/etb.c
index 2c4e3ebe..99710700 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -191,7 +191,7 @@ static int etb_read_ram(struct etb *etb, uint32_t *data, int num_frames)
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- jtag_add_dr_scan(etb->tap, 3, fields, jtag_get_end_state());
+ jtag_add_dr_scan(etb->tap, 3, fields, TAP_IDLE);
for (i = 0; i < num_frames; i++)
{
@@ -205,7 +205,7 @@ static int etb_read_ram(struct etb *etb, uint32_t *data, int num_frames)
buf_set_u32(fields[1].out_value, 0, 7, 0);
fields[0].in_value = (uint8_t *)(data + i);
- jtag_add_dr_scan(etb->tap, 3, fields, jtag_get_end_state());
+ jtag_add_dr_scan(etb->tap, 3, fields, TAP_IDLE);
jtag_add_callback(etb_getbuf, (jtag_callback_data_t)(data + i));
}
@@ -251,7 +251,7 @@ static int etb_read_reg_w_check(struct reg *reg,
fields[2].check_value = NULL;
fields[2].check_mask = NULL;
- jtag_add_dr_scan(etb_reg->etb->tap, 3, fields, jtag_get_end_state());
+ jtag_add_dr_scan(etb_reg->etb->tap, 3, fields, TAP_IDLE);
/* read the identification register in the second run, to make sure we
* don't read the ETB data register twice, skipping every second entry
@@ -261,7 +261,7 @@ static int etb_read_reg_w_check(struct reg *reg,
fields[0].check_value = check_value;
fields[0].check_mask = check_mask;
- jtag_add_dr_scan_check(etb_reg->etb->tap, 3, fields, jtag_get_end_state());
+ jtag_add_dr_scan_check(etb_reg->etb->tap, 3, fields, TAP_IDLE);
free(fields[1].out_value);
free(fields[2].out_value);