From 263dbc1472efa5f24e636e95f8c71a6f83b4097a Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Sun, 11 Feb 2024 17:22:38 +0100 Subject: target/arm_adi_v5: introduce adiv5_jim_configure_ext() Allow direct pointer to struct adiv5_private_config for targets with adiv5_private_config inside of a bigger private config container. Use it instead of the private_config pointer toggling hack in aarch64.c Allow optional use of -dap parameter and use it instead of the static variable hack in xtensa_chip.c Signed-off-by: Tomas Vanek Change-Id: I7260c79332940adfa49d57b45cae39325cdaf432 Reviewed-on: https://review.openocd.org/c/openocd/+/8138 Tested-by: jenkins Reviewed-by: Ian Thompson Reviewed-by: Antonio Borneo --- src/target/arm_adi_v5.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/target/arm_adi_v5.h') diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index 60c161f..92c3dbc 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -788,6 +788,15 @@ struct adiv5_private_config { }; extern int adiv5_verify_config(struct adiv5_private_config *pc); + +enum adiv5_configure_dap_optional { + ADI_CONFIGURE_DAP_COMPULSORY = false, + ADI_CONFIGURE_DAP_OPTIONAL = true +}; + +extern int adiv5_jim_configure_ext(struct target *target, struct jim_getopt_info *goi, + struct adiv5_private_config *pc, + enum adiv5_configure_dap_optional optional); extern int adiv5_jim_configure(struct target *target, struct jim_getopt_info *goi); struct adiv5_mem_ap_spot { -- cgit v1.1