swd: remove unused API frequency() 91/4891/3
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 6 Aug 2018 15:31:36 +0000 (17:31 +0200)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 6 Jun 2019 15:20:58 +0000 (16:20 +0100)
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>
src/jtag/drivers/cmsis_dap_usb.c
src/jtag/drivers/ftdi.c
src/jtag/drivers/jlink.c
src/jtag/drivers/vsllink.c
src/jtag/drivers/xds110.c
src/jtag/swd.h

index 5c7cde46e3068a9fbcb5598c27982ac48176f387..d52d698a437263a06552f4fa9b9fffef9a495806 100644 (file)
@@ -1653,15 +1653,6 @@ static int cmsis_dap_khz(int khz, int *jtag_speed)
        return ERROR_OK;
 }
 
        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)
 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,
 
 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,
        .switch_seq = cmsis_dap_swd_switch_seq,
        .read_reg = cmsis_dap_swd_read_reg,
        .write_reg = cmsis_dap_swd_write_reg,
index 60387a98f9c6c8b379fe2121f99ce7fd695cf192..5cd44a9d17ee15997785725a1c0ef3284cf1710c 100644 (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);
 }
 
        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) {
 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,
 
 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,
        .switch_seq = ftdi_swd_switch_seq,
        .read_reg = ftdi_swd_read_reg,
        .write_reg = ftdi_swd_write_reg,
index dd074937c9206131463c9792904ab882a84fe81e..09b3a858bcc1203d02c5144b2f59e994987e6737 100644 (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);
 }
 
        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 */
 
 /***************************************************************************/
 /* 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,
 
 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,
        .switch_seq = &jlink_swd_switch_seq,
        .read_reg = &jlink_swd_read_reg,
        .write_reg = &jlink_swd_write_reg,
index 501322bba66583acf19b72df663485b06f1120d0..4907ef0e2efd7e08ec1c064385d89fb78b3be31f 100644 (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,
 
 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,
        .switch_seq = vsllink_swd_switch_seq,
        .read_reg = vsllink_swd_read_reg,
        .write_reg = vsllink_swd_write_reg,
index 20b817879d858d6f3e9cfdb8187a723c3f660038..f25023ba76c32ca2df984a413c674748f1ef16aa 100644 (file)
@@ -1925,13 +1925,6 @@ static int xds110_khz(int khz, int *jtag_speed)
        return ERROR_OK;
 }
 
        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();
 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,
 
 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,
        .switch_seq = xds110_swd_switch_seq,
        .read_reg = xds110_swd_read_reg,
        .write_reg = xds110_swd_write_reg,
index 3ff4de0bdb2a38a8f5f154c416fac05aa6e5bd5d..0b32105a27961900c81fc49482fb97407a47f476 100644 (file)
@@ -232,24 +232,6 @@ struct swd_driver {
         */
        int (*init)(void);
 
         */
        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.
         *
        /**
         * Queue a special SWDIO sequence.
         *

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)