aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/drivers/bitbang.c
diff options
context:
space:
mode:
authorPatrick Stewart <patstew@gmail.com>2015-09-28 13:51:58 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-12-29 12:35:50 +0000
commitbf4cf766310768198cfa766467d47bdb180f9b27 (patch)
tree21f27635302092f1fa27605bc0544a54463bcf85 /src/jtag/drivers/bitbang.c
parent67f24e67347329cb3cd2f72aa84308e0b978cdc5 (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/jtag/drivers/bitbang.c')
-rw-r--r--src/jtag/drivers/bitbang.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/drivers/bitbang.c b/src/jtag/drivers/bitbang.c
index 9b4cf657..65028f21 100644
--- a/src/jtag/drivers/bitbang.c
+++ b/src/jtag/drivers/bitbang.c
@@ -459,7 +459,7 @@ static void bitbang_swd_read_reg(struct adiv5_dap *dap, uint8_t cmd, uint32_t *v
if (value)
*value = data;
if (cmd & SWD_CMD_APnDP)
- bitbang_exchange(true, NULL, 0, dap->memaccess_tck);
+ bitbang_exchange(true, NULL, 0, dap->ap[dap_ap_get_select(dap)].memaccess_tck);
return;
case SWD_ACK_WAIT:
LOG_DEBUG("SWD_ACK_WAIT");
@@ -511,7 +511,7 @@ static void bitbang_swd_write_reg(struct adiv5_dap *dap, uint8_t cmd, uint32_t v
switch (ack) {
case SWD_ACK_OK:
if (cmd & SWD_CMD_APnDP)
- bitbang_exchange(true, NULL, 0, dap->memaccess_tck);
+ bitbang_exchange(true, NULL, 0, dap->ap[dap_ap_get_select(dap)].memaccess_tck);
return;
case SWD_ACK_WAIT:
LOG_DEBUG("SWD_ACK_WAIT");