aboutsummaryrefslogtreecommitdiff
path: root/src/target/xtensa
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2024-02-11 17:22:38 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2024-03-16 14:35:24 +0000
commit263dbc1472efa5f24e636e95f8c71a6f83b4097a (patch)
tree15ed7f9e0d3833d86e06ea3d39c927d271e76e9f /src/target/xtensa
parent348b79aafe6826734921167397190c9032a6039e (diff)
downloadriscv-openocd-263dbc1472efa5f24e636e95f8c71a6f83b4097a.zip
riscv-openocd-263dbc1472efa5f24e636e95f8c71a6f83b4097a.tar.gz
riscv-openocd-263dbc1472efa5f24e636e95f8c71a6f83b4097a.tar.bz2
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 <vanekt@fbl.cz> Change-Id: I7260c79332940adfa49d57b45cae39325cdaf432 Reviewed-on: https://review.openocd.org/c/openocd/+/8138 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/target/xtensa')
-rw-r--r--src/target/xtensa/xtensa_chip.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/target/xtensa/xtensa_chip.c b/src/target/xtensa/xtensa_chip.c
index ac758ed..ac4a49c 100644
--- a/src/target/xtensa/xtensa_chip.c
+++ b/src/target/xtensa/xtensa_chip.c
@@ -144,17 +144,7 @@ static int xtensa_chip_examine(struct target *target)
static int xtensa_chip_jim_configure(struct target *target, struct jim_getopt_info *goi)
{
- static bool dap_configured;
- int ret = adiv5_jim_configure(target, goi);
- if (ret == JIM_OK) {
- LOG_DEBUG("xtensa '-dap' target option found");
- dap_configured = true;
- }
- if (!dap_configured) {
- LOG_DEBUG("xtensa '-dap' target option not yet found, assuming JTAG...");
- target->has_dap = false;
- }
- return ret;
+ return adiv5_jim_configure_ext(target, goi, NULL, ADI_CONFIGURE_DAP_OPTIONAL);
}
/** Methods for generic example of Xtensa-based chip-level targets. */