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>
bscan_optimization
Antonio Borneo 2018-08-06 17:31:36 +02:00 committed by Tomas Vanek
parent 8b9560349f
commit 7cddeb0af2
6 changed files with 0 additions and 55 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -232,24 +232,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.
*