openocd: fix minor inconsistencies after renaming "adapter" command
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 23 Aug 2019 13:12:57 +0000 (15:12 +0200)
committerOleksij Rempel <linux@rempel-privat.de>
Wed, 29 Jan 2020 05:36:30 +0000 (05:36 +0000)
Replace in the code any reference to the deprecated commands.

Change-Id: I75d28064017d664990b4024967900f32e196230a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5282
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
src/jtag/core.c
src/jtag/drivers/cmsis_dap_usb.c
src/svf/svf.c

index 111b122d95ef70f9cb94ca5c0e6754ef23110d5c..24d645a4976adbd67f8fcf2ea9287123fedf6094 100644 (file)
@@ -1519,9 +1519,9 @@ int adapter_init(struct command_context *cmd_ctx)
                return ERROR_OK;
 
        if (!adapter_driver) {
-               /* nothing was previously specified by "interface" command */
+               /* nothing was previously specified by "adapter driver" command */
                LOG_ERROR("Debug Adapter has to be specified, "
-                       "see \"interface\" command");
+                       "see \"adapter driver\" command");
                return ERROR_JTAG_INVALID_INTERFACE;
        }
 
@@ -1538,7 +1538,7 @@ int adapter_init(struct command_context *cmd_ctx)
 
        if (CLOCK_MODE_UNSELECTED == clock_mode) {
                LOG_ERROR("An adapter speed is not selected in the init script."
-                       " Insert a call to adapter_khz or jtag_rclk to proceed.");
+                       " Insert a call to \"adapter speed\" or \"jtag_rclk\" to proceed.");
                return ERROR_JTAG_INIT_FAILED;
        }
 
index c0728214c5979f66118990de18f06f56616ed865..3d2693c0a04aaa11cdc9e54a8f11256991a85de1 100644 (file)
@@ -1628,10 +1628,10 @@ static int cmsis_dap_execute_queue(void)
 static int cmsis_dap_speed(int speed)
 {
        if (speed > DAP_MAX_CLOCK)
-               LOG_INFO("High speed (adapter_khz %d) may be limited by adapter firmware.", speed);
+               LOG_INFO("High speed (adapter speed %d) may be limited by adapter firmware.", speed);
 
        if (speed == 0) {
-               LOG_ERROR("RTCK not supported. Set nonzero adapter_khz.");
+               LOG_ERROR("RTCK not supported. Set nonzero \"adapter speed\".");
                return ERROR_JTAG_NOT_IMPLEMENTED;
        }
 
index 759ba5263824bfbd5a134cc1e0f46ffe92300c7f..5d87c894490e11165b5dc0c3f403c5c9da0e4da8 100644 (file)
@@ -990,7 +990,7 @@ static int svf_run_command(struct command_context *cmd_ctx, char *cmd_str)
                                /* TODO: set jtag speed to */
                                if (svf_para.frequency > 0) {
                                        command_run_linef(cmd_ctx,
-                                                       "adapter_khz %d",
+                                                       "adapter speed %d",
                                                        (int)svf_para.frequency / 1000);
                                        LOG_DEBUG("\tfrequency = %f", svf_para.frequency);
                                }