diff options
author | Franck Jullien <franck.jullien@gmail.com> | 2013-10-13 08:23:01 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-10-15 20:40:45 +0000 |
commit | 8e6e7948de11e69fa53e7b7f306d35d6d4904b14 (patch) | |
tree | 2b01b0e10177d865aaec034fe2adf862865b985f /src/target/openrisc | |
parent | 49b7f68806c2500c1eab3349e22fe02f7da112ed (diff) | |
download | riscv-openocd-8e6e7948de11e69fa53e7b7f306d35d6d4904b14.zip riscv-openocd-8e6e7948de11e69fa53e7b7f306d35d6d4904b14.tar.gz riscv-openocd-8e6e7948de11e69fa53e7b7f306d35d6d4904b14.tar.bz2 |
openrisc/tap_vjtag: fix IR setting
Change-Id: I2b1f057dc9777ff263d6cefa4ff5958e85607a22
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/1694
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/target/openrisc')
-rw-r--r-- | src/target/openrisc/or1k_tap_vjtag.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/target/openrisc/or1k_tap_vjtag.c b/src/target/openrisc/or1k_tap_vjtag.c index ae729a0..7d26272 100644 --- a/src/target/openrisc/or1k_tap_vjtag.c +++ b/src/target/openrisc/or1k_tap_vjtag.c @@ -275,21 +275,22 @@ static int or1k_tap_vjtag_init(struct or1k_jtag *jtag_info) } /* Select VIR */ - t[0] = ALTERA_CYCLONE_CMD_USER1; + buf_set_u32(t, 0, tap->ir_length, ALTERA_CYCLONE_CMD_USER1); field.num_bits = tap->ir_length; field.out_value = t; field.in_value = NULL; jtag_add_ir_scan(tap, &field, TAP_IDLE); /* Send the DEBUG command to the VJTAG IR */ - buf_set_u32(t, 0, field.num_bits, (vjtag_node_address << m_width) | ALT_VJTAG_CMD_DEBUG); - field.num_bits = guess_addr_width(nb_nodes) + m_width; + int dr_length = guess_addr_width(nb_nodes) + m_width; + buf_set_u32(t, 0, dr_length, (vjtag_node_address << m_width) | ALT_VJTAG_CMD_DEBUG); + field.num_bits = dr_length; field.out_value = t; field.in_value = NULL; jtag_add_dr_scan(tap, 1, &field, TAP_IDLE); /* Select the VJTAG DR */ - t[0] = ALTERA_CYCLONE_CMD_USER0; + buf_set_u32(t, 0, tap->ir_length, ALTERA_CYCLONE_CMD_USER0); field.num_bits = tap->ir_length; field.out_value = t; field.in_value = NULL; |