diff options
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 |
commit | e018c7c1d29e8dabb9b4a90bb9eb3574eb1668bb (patch) | |
tree | e89d52d68c83186556ef6ae3ad6c82032fe26642 /src/target/arm_adi_v5.c | |
parent | f7d1be714b91fcc12e56c8fa78c702e75a733019 (diff) |
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/target/arm_adi_v5.c')
-rw-r--r-- | src/target/arm_adi_v5.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 1c527867..61cf9892 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -123,7 +123,6 @@ static int adi_jtag_dp_scan(struct adiv5_dap *swjdp, /* Scan out a read or write operation using some DP or AP register. * For APACC access with any sticky error flag set, this is discarded. */ - fields[0].tap = jtag_info->tap; fields[0].num_bits = 3; buf_set_u32(&out_addr_buf, 0, 3, ((reg_addr >> 1) & 0x6) | (RnW & 0x1)); fields[0].out_value = &out_addr_buf; @@ -134,12 +133,11 @@ static int adi_jtag_dp_scan(struct adiv5_dap *swjdp, * When overrun detect is active, STICKYORUN is set. */ - fields[1].tap = jtag_info->tap; fields[1].num_bits = 32; fields[1].out_value = outvalue; fields[1].in_value = invalue; - jtag_add_dr_scan(2, fields, jtag_get_end_state()); + jtag_add_dr_scan(jtag_info->tap, 2, fields, jtag_get_end_state()); /* Add specified number of tck clocks after starting memory bus * access, giving the hardware time to complete the access. @@ -1132,12 +1130,11 @@ static int jtag_idcode_q_read(struct adiv5_dap *dap, if (retval != ERROR_OK) return retval; - fields[0].tap = jtag_info->tap; fields[0].num_bits = 32; fields[0].out_value = NULL; fields[0].in_value = (void *) data; - jtag_add_dr_scan(1, fields, jtag_get_end_state()); + jtag_add_dr_scan(jtag_info->tap, 1, fields, jtag_get_end_state()); retval = jtag_get_error(); if (retval != ERROR_OK) return retval; |