From 2231da8ec4e7d7ae9b652f3dd1a7104f5a110f3f Mon Sep 17 00:00:00 2001 From: Matthias Welwarsky Date: Fri, 23 Mar 2018 21:17:29 +0100 Subject: target: restructure dap support - add 'dap create' command to create dap instances - move all dap subcmmand into the dap instance commands - keep 'dap info' for convenience - change all armv7 and armv8 targets to take a dap instance instead of a jtag chain position - restructure tap/dap/target relations, jtag tap no longer references the dap, daps are now independently created and initialized. - clean up swd connect - re-initialize DAP also on JTAG errors (e.g. after reset, power cycle) - update documentation - update target files Change-Id: I322cf3969b5407c25d1d3962f9d9b9bc1df067d9 Signed-off-by: Matthias Welwarsky Reviewed-on: http://openocd.zylin.com/4468 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/jtag/core.c | 3 ++- src/jtag/jtag.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/jtag') diff --git a/src/jtag/core.c b/src/jtag/core.c index df4afeb9..0fbd327f 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -1315,7 +1315,6 @@ void jtag_tap_free(struct jtag_tap *tap) free(tap->chip); free(tap->tapname); free(tap->dotted_name); - free(tap->dap); free(tap); } @@ -1487,6 +1486,8 @@ int adapter_quit(void) t = n; } + dap_cleanup_all(); + return ERROR_OK; } diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index 751facb1..a6891c03 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -153,8 +153,6 @@ struct jtag_tap { struct jtag_tap_event_action *event_action; struct jtag_tap *next_tap; - /* dap instance if some null if no instance , initialized to 0 by calloc*/ - struct adiv5_dap *dap; /* private pointer to support none-jtag specific functions */ void *priv; }; -- cgit v1.2.3-18-g5258