aboutsummaryrefslogtreecommitdiff
path: root/src/target/arm9tdmi.c
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-11-14 00:30:28 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-12-29 20:27:01 +0000
commitdc574aa1da291405c6778383c1ad3b252602aee7 (patch)
tree4cc84b82dbebf9d715b3eb9ea18a402205163d6c /src/target/arm9tdmi.c
parenta6c4eb03455f6e97fc25183aae249d6ccdcbfb0f (diff)
downloadriscv-openocd-dc574aa1da291405c6778383c1ad3b252602aee7.zip
riscv-openocd-dc574aa1da291405c6778383c1ad3b252602aee7.tar.gz
riscv-openocd-dc574aa1da291405c6778383c1ad3b252602aee7.tar.bz2
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 <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3142 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/target/arm9tdmi.c')
-rw-r--r--src/target/arm9tdmi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index ac07534..ca000a7 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;