diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2018-08-06 17:31:36 +0200 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-06-06 16:20:58 +0100 |
commit | 7cddeb0af20049fc891ed726885aebceeb1e22b7 (patch) | |
tree | 7ceb4900b7e57606cfe8b73d59699a02bd4fe2cc /src | |
parent | 8b9560349fb78887d8e353e20b303966d9ac2d1b (diff) | |
download | riscv-openocd-7cddeb0af20049fc891ed726885aebceeb1e22b7.zip riscv-openocd-7cddeb0af20049fc891ed726885aebceeb1e22b7.tar.gz riscv-openocd-7cddeb0af20049fc891ed726885aebceeb1e22b7.tar.bz2 |
swd: remove unused API frequency()
The specific SWD API to change/query the adapter speed is never
called because the equivalent JTAG API is used in place of it.
In the restructure of struct jtag_interface, the JTAG API is
promoted as global adapter API, thus a specific SWD one is not
anymore required.
Change-Id: I1e810d255b4dfcd5791b4fac8ae1260c31a057fd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4891
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/drivers/cmsis_dap_usb.c | 10 | ||||
-rw-r--r-- | src/jtag/drivers/ftdi.c | 9 | ||||
-rw-r--r-- | src/jtag/drivers/jlink.c | 9 | ||||
-rw-r--r-- | src/jtag/drivers/vsllink.c | 1 | ||||
-rw-r--r-- | src/jtag/drivers/xds110.c | 8 | ||||
-rw-r--r-- | src/jtag/swd.h | 18 |
6 files changed, 0 insertions, 55 deletions
diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c index 5c7cde4..d52d698 100644 --- a/src/jtag/drivers/cmsis_dap_usb.c +++ b/src/jtag/drivers/cmsis_dap_usb.c @@ -1653,15 +1653,6 @@ static int cmsis_dap_khz(int khz, int *jtag_speed) return ERROR_OK; } -static int_least32_t cmsis_dap_swd_frequency(int_least32_t hz) -{ - if (hz > 0) - cmsis_dap_speed(hz / 1000); - - return hz; -} - - COMMAND_HANDLER(cmsis_dap_handle_info_command) { if (cmsis_dap_get_version_info() == ERROR_OK) @@ -1790,7 +1781,6 @@ static const struct command_registration cmsis_dap_command_handlers[] = { static const struct swd_driver cmsis_dap_swd_driver = { .init = cmsis_dap_swd_init, - .frequency = cmsis_dap_swd_frequency, .switch_seq = cmsis_dap_swd_switch_seq, .read_reg = cmsis_dap_swd_read_reg, .write_reg = cmsis_dap_swd_write_reg, diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c index 60387a9..5cd44a9 100644 --- a/src/jtag/drivers/ftdi.c +++ b/src/jtag/drivers/ftdi.c @@ -1203,14 +1203,6 @@ static void ftdi_swd_write_reg(uint8_t cmd, uint32_t value, uint32_t ap_delay_cl ftdi_swd_queue_cmd(cmd, NULL, value, ap_delay_clk); } -static int_least32_t ftdi_swd_frequency(int_least32_t hz) -{ - if (hz > 0) - freq = mpsse_set_frequency(mpsse_ctx, hz); - - return freq; -} - static int ftdi_swd_switch_seq(enum swd_special_seq seq) { switch (seq) { @@ -1239,7 +1231,6 @@ static int ftdi_swd_switch_seq(enum swd_special_seq seq) static const struct swd_driver ftdi_swd = { .init = ftdi_swd_init, - .frequency = ftdi_swd_frequency, .switch_seq = ftdi_swd_switch_seq, .read_reg = ftdi_swd_read_reg, .write_reg = ftdi_swd_write_reg, diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index dd07493..09b3a85 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -1929,14 +1929,6 @@ static void jlink_swd_read_reg(uint8_t cmd, uint32_t *value, uint32_t ap_delay_c jlink_swd_queue_cmd(cmd, value, 0, ap_delay_clk); } -static int_least32_t jlink_swd_frequency(int_least32_t hz) -{ - if (hz > 0) - jlink_speed(hz / 1000); - - return hz; -} - /***************************************************************************/ /* J-Link tap functions */ @@ -2212,7 +2204,6 @@ static void jlink_swd_queue_cmd(uint8_t cmd, uint32_t *dst, uint32_t data, uint3 static const struct swd_driver jlink_swd = { .init = &jlink_swd_init, - .frequency = &jlink_swd_frequency, .switch_seq = &jlink_swd_switch_seq, .read_reg = &jlink_swd_read_reg, .write_reg = &jlink_swd_write_reg, diff --git a/src/jtag/drivers/vsllink.c b/src/jtag/drivers/vsllink.c index 501322b..4907ef0 100644 --- a/src/jtag/drivers/vsllink.c +++ b/src/jtag/drivers/vsllink.c @@ -956,7 +956,6 @@ static const char * const vsllink_transports[] = {"jtag", "swd", NULL}; static const struct swd_driver vsllink_swd_driver = { .init = vsllink_swd_init, - .frequency = vsllink_swd_frequency, .switch_seq = vsllink_swd_switch_seq, .read_reg = vsllink_swd_read_reg, .write_reg = vsllink_swd_write_reg, diff --git a/src/jtag/drivers/xds110.c b/src/jtag/drivers/xds110.c index 20b8178..f25023b 100644 --- a/src/jtag/drivers/xds110.c +++ b/src/jtag/drivers/xds110.c @@ -1925,13 +1925,6 @@ static int xds110_khz(int khz, int *jtag_speed) return ERROR_OK; } -static int_least32_t xds110_swd_frequency(int_least32_t hz) -{ - if (hz > 0) - xds110_speed(hz / 1000); - return hz; -} - COMMAND_HANDLER(xds110_handle_info_command) { xds110_show_info(); @@ -2032,7 +2025,6 @@ static const struct command_registration xds110_command_handlers[] = { static const struct swd_driver xds110_swd_driver = { .init = xds110_swd_init, - .frequency = xds110_swd_frequency, .switch_seq = xds110_swd_switch_seq, .read_reg = xds110_swd_read_reg, .write_reg = xds110_swd_write_reg, diff --git a/src/jtag/swd.h b/src/jtag/swd.h index 3ff4de0..0b32105 100644 --- a/src/jtag/swd.h +++ b/src/jtag/swd.h @@ -233,24 +233,6 @@ struct swd_driver { int (*init)(void); /** - * Set the SWCLK frequency of the SWD link. - * - * The driver should round the desired value, downwards if possible, to - * the nearest supported frequency. A negative value should be ignored - * and can be used to query the current setting. If the driver does not - * support a variable frequency a fixed, nominal, value should be - * returned. - * - * If the frequency is increased, it must not apply before the currently - * queued transactions are executed. If the frequency is lowered, it may - * apply immediately. - * - * @param hz The desired frequency in Hz. - * @return The actual resulting frequency after rounding. - */ - int_least32_t (*frequency)(int_least32_t hz); - - /** * Queue a special SWDIO sequence. * * @param seq The special sequence to generate. |