From dc574aa1da291405c6778383c1ad3b252602aee7 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Sat, 14 Nov 2015 00:30:28 +0100 Subject: [PATCH] target/arm: Remove usage of struct arm_jtag in ARMv7 targets The Cortex-A and Cortex-M keeps an arm_jtag struct around just to be able to pass a pointer to it to one common JTAG function which anyway only uses the TAP field. Refactor the function to take a TAP directly, remove the legacy struct from cortex instances and store the TAP pointer only in the DAP. Cortex-M makes a call to arm_jtag_setup_connection() with the struct but the function does nothing useful for a Cortex-M target so remove the call. Change-Id: I3b33709ef55372ef14522ed4337e9f2e817ae3ab Signed-off-by: Andreas Fritiofson Reviewed-on: http://openocd.zylin.com/3142 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/target/adi_v5_jtag.c | 6 +++--- src/target/arm720t.c | 2 +- src/target/arm7_9_common.c | 12 ++++++------ src/target/arm7tdmi.c | 8 ++++---- src/target/arm920t.c | 6 +++--- src/target/arm926ejs.c | 8 ++++---- src/target/arm946e.c | 4 ++-- src/target/arm966e.c | 4 ++-- src/target/arm9tdmi.c | 8 ++++---- src/target/arm_adi_v5.h | 2 +- src/target/arm_jtag.c | 6 ++---- src/target/arm_jtag.h | 10 +++------- src/target/cortex_a.c | 6 +----- src/target/cortex_a.h | 1 - src/target/cortex_m.c | 11 +---------- src/target/cortex_m.h | 1 - src/target/embeddedice.c | 10 +++++----- src/target/etm.c | 4 ++-- src/target/feroceon.c | 2 +- 19 files changed, 45 insertions(+), 66 deletions(-) diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index 4c0f04078..3ab53994e 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -81,12 +81,12 @@ static int adi_jtag_dp_scan(struct adiv5_dap *dap, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint8_t *outvalue, uint8_t *invalue, uint8_t *ack) { - struct arm_jtag *jtag_info = dap->jtag_info; + struct jtag_tap *tap = dap->tap; struct scan_field fields[2]; uint8_t out_addr_buf; int retval; - retval = arm_jtag_set_instr(jtag_info, instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(tap, instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -107,7 +107,7 @@ static int adi_jtag_dp_scan(struct adiv5_dap *dap, fields[1].out_value = outvalue; fields[1].in_value = invalue; - jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE); + jtag_add_dr_scan(tap, 2, fields, TAP_IDLE); /* Add specified number of tck clocks after starting memory bus * access, giving the hardware time to complete the access. diff --git a/src/target/arm720t.c b/src/target/arm720t.c index 619c80a13..a97ad118e 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -58,7 +58,7 @@ static int arm720t_scan_cp15(struct target *target, retval = arm_jtag_scann(jtag_info, 0xf, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 617ee7840..7b40f5057 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -628,11 +628,11 @@ int arm7_9_execute_sys_speed(struct target *target) /* set RESTART instruction */ if (arm7_9->need_bypass_before_restart) { arm7_9->need_bypass_before_restart = 0; - retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; } - retval = arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0x4, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -682,11 +682,11 @@ static int arm7_9_execute_fast_sys_speed(struct target *target) /* set RESTART instruction */ if (arm7_9->need_bypass_before_restart) { arm7_9->need_bypass_before_restart = 0; - retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; } - retval = arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0x4, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -1639,11 +1639,11 @@ static int arm7_9_restart_core(struct target *target) if (arm7_9->need_bypass_before_restart) { arm7_9->need_bypass_before_restart = 0; - retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; } - retval = arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0x4, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index 807efad14..490ecfc0b 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -66,7 +66,7 @@ static int arm7tdmi_examine_debug_reason(struct target *target) retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(arm7_9->jtag_info.tap, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; @@ -126,7 +126,7 @@ static inline int arm7tdmi_clock_out(struct arm_jtag *jtag_info, retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; @@ -142,7 +142,7 @@ static int arm7tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in) retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; @@ -187,7 +187,7 @@ static int arm7tdmi_clock_data_in_endianness(struct arm_jtag *jtag_info, retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm920t.c b/src/target/arm920t.c index f6a0f5bf8..b1579bca5 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -96,7 +96,7 @@ static int arm920t_read_cp15_physical(struct target *target, retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -151,7 +151,7 @@ static int arm920t_write_cp15_physical(struct target *target, retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -204,7 +204,7 @@ static int arm920t_execute_cp15(struct target *target, uint32_t cp15_opcode, retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 4e77ff2e2..d8bf2d046 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -67,7 +67,7 @@ static int arm926ejs_cp15_read(struct target *target, uint32_t op1, uint32_t op2 retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -117,7 +117,7 @@ static int arm926ejs_cp15_read(struct target *target, uint32_t op1, uint32_t op2 LOG_DEBUG("addr: 0x%x value: %8.8x", address, *value); #endif - retval = arm_jtag_set_instr(jtag_info, 0xc, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0xc, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -153,7 +153,7 @@ static int arm926ejs_cp15_write(struct target *target, uint32_t op1, uint32_t op retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -200,7 +200,7 @@ static int arm926ejs_cp15_write(struct target *target, uint32_t op1, uint32_t op LOG_DEBUG("addr: 0x%x value: %8.8x", address, value); #endif - retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm946e.c b/src/target/arm946e.c index fb50d694c..c21ff95f7 100644 --- a/src/target/arm946e.c +++ b/src/target/arm946e.c @@ -139,7 +139,7 @@ static int arm946e_read_cp15(struct target *target, int reg_addr, uint32_t *valu retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -191,7 +191,7 @@ int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value) retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm966e.c b/src/target/arm966e.c index 6a96ab18f..a174eab40 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -87,7 +87,7 @@ static int arm966e_read_cp15(struct target *target, int reg_addr, uint32_t *valu retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -141,7 +141,7 @@ int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value) retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index ac07534f3..ca000a7fe 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -100,7 +100,7 @@ int arm9tdmi_examine_debug_reason(struct target *target) retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(arm7_9->jtag_info.tap, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; @@ -154,7 +154,7 @@ int arm9tdmi_clock_out(struct arm_jtag *jtag_info, uint32_t instr, if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; @@ -206,7 +206,7 @@ int arm9tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in) if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; @@ -258,7 +258,7 @@ int arm9tdmi_clock_data_in_endianness(struct arm_jtag *jtag_info, if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index e6aabdd28..7f98d509b 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -182,7 +182,7 @@ struct adiv5_ap { struct adiv5_dap { const struct dap_ops *ops; - struct arm_jtag *jtag_info; + struct jtag_tap *tap; /* Control config */ uint32_t dp_ctrl_stat; diff --git a/src/target/arm_jtag.c b/src/target/arm_jtag.c index 6f70e853a..d2b9feeed 100644 --- a/src/target/arm_jtag.c +++ b/src/target/arm_jtag.c @@ -31,11 +31,9 @@ #define _ARM_JTAG_SCAN_N_CHECK_ #endif -int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, +int arm_jtag_set_instr_inner(struct jtag_tap *tap, uint32_t new_instr, void *no_verify_capture, tap_state_t end_state) { - struct jtag_tap *tap; - tap = jtag_info->tap; struct scan_field field; uint8_t t[4]; @@ -64,7 +62,7 @@ int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain, ta buf_set_u32(out_value, 0, jtag_info->scann_size, new_scan_chain); struct scan_field field = { .num_bits = jtag_info->scann_size, .out_value = out_value, }; - retval = arm_jtag_set_instr(jtag_info, jtag_info->scann_instr, NULL, end_state); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->scann_instr, NULL, end_state); if (retval != ERROR_OK) return retval; diff --git a/src/target/arm_jtag.h b/src/target/arm_jtag.h index 13b701fc3..dbfec857b 100644 --- a/src/target/arm_jtag.h +++ b/src/target/arm_jtag.h @@ -36,20 +36,16 @@ struct arm_jtag { uint32_t intest_instr; }; -int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, uint32_t new_instr, +int arm_jtag_set_instr_inner(struct jtag_tap *tap, uint32_t new_instr, void *no_verify_capture, tap_state_t end_state); -static inline int arm_jtag_set_instr(struct arm_jtag *jtag_info, +static inline int arm_jtag_set_instr(struct jtag_tap *tap, uint32_t new_instr, void *no_verify_capture, tap_state_t end_state) { /* inline most common code path */ - struct jtag_tap *tap; - tap = jtag_info->tap; - assert(tap != NULL); - if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr) - return arm_jtag_set_instr_inner(jtag_info, new_instr, no_verify_capture, end_state); + return arm_jtag_set_instr_inner(tap, new_instr, no_verify_capture, end_state); return ERROR_OK; diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 45a877d36..7da57b498 100644 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -3127,12 +3127,8 @@ static int cortex_a_init_arch_info(struct target *target, if (!tap->dap) { tap->dap = dap_init(); - /* prepare JTAG information for the new target */ - cortex_a->jtag_info.tap = tap; - cortex_a->jtag_info.scann_size = 4; - /* Leave (only) generic DAP stuff for debugport_init() */ - tap->dap->jtag_info = &cortex_a->jtag_info; + tap->dap->tap = tap; } tap->dap->ap[dap_ap_get_select(tap->dap)].memaccess_tck = 80; diff --git a/src/target/cortex_a.h b/src/target/cortex_a.h index e124a9e07..d33188ffc 100644 --- a/src/target/cortex_a.h +++ b/src/target/cortex_a.h @@ -70,7 +70,6 @@ struct cortex_a_brp { struct cortex_a_common { int common_magic; - struct arm_jtag jtag_info; /* Context information */ uint32_t cpudbg_dscr; diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index f8a513265..ec5caa288 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -2104,7 +2104,6 @@ static int cortex_m_handle_target_request(void *priv) static int cortex_m_init_arch_info(struct target *target, struct cortex_m_common *cortex_m, struct jtag_tap *tap) { - int retval; struct armv7m_common *armv7m = &cortex_m->armv7m; armv7m_init_arch_info(target, armv7m); @@ -2113,12 +2112,8 @@ static int cortex_m_init_arch_info(struct target *target, if (!tap->dap) { tap->dap = dap_init(); - /* prepare JTAG information for the new target */ - cortex_m->jtag_info.tap = tap; - cortex_m->jtag_info.scann_size = 4; - /* Leave (only) generic DAP stuff for debugport_init() */ - tap->dap->jtag_info = &cortex_m->jtag_info; + tap->dap->tap = tap; } /* default reset mode is to use srst if fitted @@ -2142,10 +2137,6 @@ static int cortex_m_init_arch_info(struct target *target, target_register_timer_callback(cortex_m_handle_target_request, 1, 1, target); - retval = arm_jtag_setup_connection(&cortex_m->jtag_info); - if (retval != ERROR_OK) - return retval; - return ERROR_OK; } diff --git a/src/target/cortex_m.h b/src/target/cortex_m.h index 94a30f1a6..b09cc49a6 100644 --- a/src/target/cortex_m.h +++ b/src/target/cortex_m.h @@ -164,7 +164,6 @@ enum cortex_m_isrmasking_mode { struct cortex_m_common { int common_magic; - struct arm_jtag jtag_info; /* Context information */ uint32_t dcb_dhcsr; diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c index 2d32c83a5..4b3a05a83 100644 --- a/src/target/embeddedice.c +++ b/src/target/embeddedice.c @@ -349,7 +349,7 @@ int embeddedice_read_reg_w_check(struct reg *reg, if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(ice_reg->jtag_info, + retval = arm_jtag_set_instr(ice_reg->jtag_info->tap, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -415,7 +415,7 @@ int embeddedice_receive(struct arm_jtag *jtag_info, uint32_t *data, uint32_t siz retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -502,7 +502,7 @@ void embeddedice_write_reg(struct reg *reg, uint32_t value) arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE); - arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE); + arm_jtag_set_instr(ice_reg->jtag_info->tap, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE); uint8_t reg_addr = ice_reg->addr & 0x1f; embeddedice_write_reg_inner(ice_reg->jtag_info->tap, reg_addr, value); @@ -536,7 +536,7 @@ int embeddedice_send(struct arm_jtag *jtag_info, uint32_t *data, uint32_t size) retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; @@ -593,7 +593,7 @@ int embeddedice_handshake(struct arm_jtag *jtag_info, int hsbit, uint32_t timeou retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE); if (retval != ERROR_OK) return retval; diff --git a/src/target/etm.c b/src/target/etm.c index ddeb9226e..0246ae25e 100644 --- a/src/target/etm.c +++ b/src/target/etm.c @@ -515,7 +515,7 @@ static int etm_read_reg_w_check(struct reg *reg, retval = arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(etm_reg->jtag_info, + retval = arm_jtag_set_instr(etm_reg->jtag_info->tap, etm_reg->jtag_info->intest_instr, NULL, TAP_IDLE); @@ -602,7 +602,7 @@ static int etm_write_reg(struct reg *reg, uint32_t value) retval = arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE); if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(etm_reg->jtag_info, + retval = arm_jtag_set_instr(etm_reg->jtag_info->tap, etm_reg->jtag_info->intest_instr, NULL, TAP_IDLE); diff --git a/src/target/feroceon.c b/src/target/feroceon.c index ee0bafd24..9c204f04f 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -88,7 +88,7 @@ static int feroceon_dummy_clock_out(struct arm_jtag *jtag_info, uint32_t instr) if (retval != ERROR_OK) return retval; - retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE); + retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE); if (retval != ERROR_OK) return retval;