aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/at91samd.c
diff options
context:
space:
mode:
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-12-06 11:20:49 +0100
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2015-12-29 20:29:14 +0000
commit8a069b7b906fd7ce9c19439e2db2f116e8942b65 (patch)
tree09752cace8e683264af4c11d72e9b0e4d24efbda /src/flash/nor/at91samd.c
parentf9dfbf3ac75f65dad324fea641e08acca6a8a5e3 (diff)
downloadriscv-openocd-8a069b7b906fd7ce9c19439e2db2f116e8942b65.zip
riscv-openocd-8a069b7b906fd7ce9c19439e2db2f116e8942b65.tar.gz
riscv-openocd-8a069b7b906fd7ce9c19439e2db2f116e8942b65.tar.bz2
arm_adi_v5: Change mem_ap calls to take pointer to AP and not DAP
Change-Id: I8d3e42056aa5828cb917ca578a54b7d53846a150 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3149 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/flash/nor/at91samd.c')
-rw-r--r--src/flash/nor/at91samd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c
index f3f6b28..a8633bf 100644
--- a/src/flash/nor/at91samd.c
+++ b/src/flash/nor/at91samd.c
@@ -988,7 +988,6 @@ COMMAND_HANDLER(samd_handle_reset_deassert)
{
struct target *target = get_current_target(CMD_CTX);
struct armv7m_common *armv7m = target_to_armv7m(target);
- struct adiv5_dap *swjdp = armv7m->arm.dap;
int retval = ERROR_OK;
enum reset_types jtag_reset_config = jtag_get_reset_config();
@@ -1000,9 +999,9 @@ COMMAND_HANDLER(samd_handle_reset_deassert)
* After vectreset DSU release is not needed however makes no harm
*/
if (target->reset_halt && (jtag_reset_config & RESET_HAS_SRST)) {
- retval = mem_ap_sel_write_u32(swjdp, armv7m->debug_ap->ap_num, DCB_DHCSR, DBGKEY | C_HALT | C_DEBUGEN);
+ retval = mem_ap_sel_write_u32(armv7m->debug_ap, DCB_DHCSR, DBGKEY | C_HALT | C_DEBUGEN);
if (retval == ERROR_OK)
- retval = mem_ap_sel_write_u32(swjdp, armv7m->debug_ap->ap_num, DCB_DEMCR,
+ retval = mem_ap_sel_write_u32(armv7m->debug_ap, DCB_DEMCR,
TRCENA | VC_HARDERR | VC_BUSERR | VC_CORERESET);
/* do not return on error here, releasing DSU reset is more important */
}