From: Andreas Fritiofson Date: Fri, 9 May 2014 20:50:34 +0000 (+0200) Subject: swd: Remove support for turnaround periods other than 1 X-Git-Tag: v0.9.0-rc1~355 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5a7eae940b8ed47f79ec433d6fcc3494fa0fae5b;p=openocd swd: Remove support for turnaround periods other than 1 ARM deprecated other trn periods in ADIv5.1 and one cycle is the only setting that is guaranteed to be implemented, as well as being the reset value in ADIv5.0. Thus it makes no sense supporting anything else. Change-Id: Iffa16bb0ce74788bca88fd3ace8a026148013d00 Signed-off-by: Andreas Fritiofson Reviewed-on: http://openocd.zylin.com/2132 Tested-by: jenkins Reviewed-by: Paul Fertser --- diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c index 180a91b4..5072de0c 100644 --- a/src/jtag/drivers/cmsis_dap_usb.c +++ b/src/jtag/drivers/cmsis_dap_usb.c @@ -828,7 +828,7 @@ static int cmsis_dap_init(void) return ERROR_OK; } -static int cmsis_dap_swd_init(uint8_t trn) +static int cmsis_dap_swd_init(void) { int retval; diff --git a/src/jtag/swd.h b/src/jtag/swd.h index 2e676b50..b0db5d2a 100644 --- a/src/jtag/swd.h +++ b/src/jtag/swd.h @@ -58,17 +58,13 @@ static inline uint8_t swd_cmd(bool is_read, bool is_ap, uint8_t regnum) struct swd_driver { /** * Initialize the debug link so it can perform SWD operations. - * @param trn value from WCR: how many clocks - * to not drive the SWDIO line at certain points in - * the SWD protocol (at least 1 clock). * * As an example, this would switch a dual-mode debug adapter * into SWD mode and out of JTAG mode. * * @return ERROR_OK on success, else a negative fault code. */ - int (*init)(uint8_t trn); - + int (*init)(void); /** * Queued read of an AP or DP register. diff --git a/src/target/adi_v5_cmsis_dap.c b/src/target/adi_v5_cmsis_dap.c index 9c13e5a9..9cdf08ab 100644 --- a/src/target/adi_v5_cmsis_dap.c +++ b/src/target/adi_v5_cmsis_dap.c @@ -244,7 +244,7 @@ static int cmsis_dap_select(struct command_context *ctx) return ERROR_FAIL; } - retval = swd->init(1); + retval = swd->init(); if (retval != ERROR_OK) { LOG_ERROR("unable to init CMSIS-DAP driver"); return retval; diff --git a/src/target/adi_v5_swd.c b/src/target/adi_v5_swd.c index 31c219e5..f08b0be0 100644 --- a/src/target/adi_v5_swd.c +++ b/src/target/adi_v5_swd.c @@ -380,7 +380,7 @@ static int swd_select(struct command_context *ctx) return ERROR_FAIL; } - retval = swd->init(1); + retval = swd->init(); if (retval != ERROR_OK) { LOG_DEBUG("can't init SWD driver"); return retval;