diff options
author | Jie Zhang <jzhang918@gmail.com> | 2011-08-01 17:15:19 +0100 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2011-08-01 17:16:10 +0100 |
commit | d02dfff48b0051ddf4142c9e2d657811ff30eec8 (patch) | |
tree | e0346686a1d8f9ee25a8fbd6647092814525fc98 /src/target/etb.c | |
parent | 69ac20a1556b06f837986cd12c4724970550c24f (diff) | |
download | riscv-openocd-d02dfff48b0051ddf4142c9e2d657811ff30eec8.zip riscv-openocd-d02dfff48b0051ddf4142c9e2d657811ff30eec8.tar.gz riscv-openocd-d02dfff48b0051ddf4142c9e2d657811ff30eec8.tar.bz2 |
etb: fix incorrect previous patchset
This corrects two issues found with openocd.
d7f71e7fe9645fa8c3f88cf6fc9ad438aa6708f3 removed some code that was
being used.
The above then caused even more code to get removed by commit 1cfb2287a67c1f78b76583b2e5ed83ca3560b0d5.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/target/etb.c')
-rw-r--r-- | src/target/etb.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/target/etb.c b/src/target/etb.c index 3cb2254..974ab2b 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -304,20 +304,32 @@ static int etb_write_reg(struct reg *reg, uint32_t value) { struct etb_reg *etb_reg = reg->arch_info; uint8_t reg_addr = etb_reg->addr & 0x7f; + struct scan_field fields[3]; LOG_DEBUG("%i: 0x%8.8" PRIx32 "", (int)(etb_reg->addr), value); etb_scann(etb_reg->etb, 0x0); etb_set_instr(etb_reg->etb, 0xc); + fields[0].num_bits = 32; uint8_t temp0[4]; + fields[0].out_value = temp0; buf_set_u32(&temp0, 0, 32, value); + fields[0].in_value = NULL; + fields[1].num_bits = 7; uint8_t temp1; + fields[1].out_value = &temp1; buf_set_u32(&temp1, 0, 7, reg_addr); + fields[1].in_value = NULL; + fields[2].num_bits = 1; uint8_t temp2; + fields[2].out_value = &temp2; buf_set_u32(&temp2, 0, 1, 1); + fields[2].in_value = NULL; + + jtag_add_dr_scan(etb_reg->etb->tap, 3, fields, TAP_IDLE); return ERROR_OK; } |