diff options
author | Patrick Stewart <patstew@gmail.com> | 2015-09-28 13:51:58 +0100 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2015-12-29 12:35:50 +0000 |
commit | bf4cf766310768198cfa766467d47bdb180f9b27 (patch) | |
tree | 21f27635302092f1fa27605bc0544a54463bcf85 /src/target/adi_v5_jtag.c | |
parent | 67f24e67347329cb3cd2f72aa84308e0b978cdc5 (diff) |
arm_debug: Support multiple APs per DAP and remove DAP from armv7* structs
Separate out the values from adiv5_dap that are associated with a specific AP into a new struct, so we can properly support multiple APs. Remove the DAP struct from the armv7* structs, because we can have multiple CPUs per DAP, and we shouldn't have multiple DAP structs. Tidy up a few places where ap_current is used incorrectly.
Change-Id: I0c6ef4b49cc86b140366347aaf9b76c07cbab0a8
Signed-off-by: Patrick Stewart <patstew@gmail.com>
Reviewed-on: http://openocd.zylin.com/2984
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/target/adi_v5_jtag.c')
-rw-r--r-- | src/target/adi_v5_jtag.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/target/adi_v5_jtag.c b/src/target/adi_v5_jtag.c index c4ed98a7..4c0f0407 100644 --- a/src/target/adi_v5_jtag.c +++ b/src/target/adi_v5_jtag.c @@ -117,8 +117,8 @@ static int adi_jtag_dp_scan(struct adiv5_dap *dap, if ((instr == JTAG_DP_APACC) && ((reg_addr == MEM_AP_REG_DRW) || ((reg_addr & 0xF0) == MEM_AP_REG_BD0)) - && (dap->memaccess_tck != 0)) - jtag_add_runtest(dap->memaccess_tck, + && (dap->ap[dap_ap_get_select(dap)].memaccess_tck != 0)) + jtag_add_runtest(dap->ap[dap_ap_get_select(dap)].memaccess_tck, TAP_IDLE); return ERROR_OK; @@ -280,14 +280,14 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap) * MEM-AP access; but not if autoincrementing. * *Real* CSW and TAR values are always shown. */ - if (dap->ap_tar_value != (uint32_t) -1) + if (dap->ap[dap_ap_get_select(dap)].tar_value != (uint32_t) -1) LOG_DEBUG("MEM-AP Cached values: " "ap_bank 0x%" PRIx32 ", ap_csw 0x%" PRIx32 ", ap_tar 0x%" PRIx32, dap->ap_bank_value, - dap->ap_csw_value, - dap->ap_tar_value); + dap->ap[dap_ap_get_select(dap)].csw_value, + dap->ap[dap_ap_get_select(dap)].tar_value); if (ctrlstat & SSTICKYORUN) LOG_ERROR("JTAG-DP OVERRUN - check clock, " |