diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-04-01 00:00:39 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-04-01 08:59:11 +0200 |
commit | 378567da4e40a31efed349fbe68deebd14079b94 (patch) | |
tree | 0f8c82534381cc867df0e4796b8db9d694582eb6 /src/target/mips_ejtag.c | |
parent | 2615bf4398f393ee1e387128064093dcd44749c8 (diff) | |
download | riscv-openocd-378567da4e40a31efed349fbe68deebd14079b94.zip riscv-openocd-378567da4e40a31efed349fbe68deebd14079b94.tar.gz riscv-openocd-378567da4e40a31efed349fbe68deebd14079b94.tar.bz2 |
mips: illustrates how to improve performance
Do not require unecessary roundtrips for clocking out
data.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/mips_ejtag.c')
-rw-r--r-- | src/target/mips_ejtag.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/target/mips_ejtag.c b/src/target/mips_ejtag.c index 9df8a02..087be07 100644 --- a/src/target/mips_ejtag.c +++ b/src/target/mips_ejtag.c @@ -146,11 +146,24 @@ int mips_ejtag_drscan_8(struct mips_ejtag *ejtag_info, uint32_t *data) *data = buf_get_u32(field.in_value, 0, 32); - keep_alive(); - return ERROR_OK; } +void mips_ejtag_drscan_8_out(struct mips_ejtag *ejtag_info, uint8_t data) +{ + struct jtag_tap *tap; + tap = ejtag_info->tap; + assert(tap != NULL); + + struct scan_field field; + + field.num_bits = 8; + field.out_value = &data; + field.in_value = NULL; + + jtag_add_dr_scan(tap, 1, &field, TAP_IDLE); +} + static int mips_ejtag_step_enable(struct mips_ejtag *ejtag_info) { static const uint32_t code[] = { |