From dc574aa1da291405c6778383c1ad3b252602aee7 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Sat, 14 Nov 2015 00:30:28 +0100 Subject: 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/arm946e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/target/arm946e.c') diff --git a/src/target/arm946e.c b/src/target/arm946e.c index fb50d694..c21ff95f 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; -- cgit v1.2.3-18-g5258