aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/aice
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2021-10-07 19:34:27 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2021-11-28 10:50:50 +0000
commita3b69dee622066d3a2b70c32775818d82b5ffb54 (patch)
tree31bf5ef65d1e726d51810881b4beea6f3dca28d3 /src/jtag/aice
parent0343ae7cc734d8dfae17ff1ae9dbe834962f6da3 (diff)
downloadriscv-openocd-a3b69dee622066d3a2b70c32775818d82b5ffb54.zip
riscv-openocd-a3b69dee622066d3a2b70c32775818d82b5ffb54.tar.gz
riscv-openocd-a3b69dee622066d3a2b70c32775818d82b5ffb54.tar.bz2
jtag/aice: switch to command 'adapter serial'
The driver aice defines the command 'aice serial' to specify the serial string of the adapter, but actually does not use this value in the code. Remove and deprecate the driver command, and use 'adapter serial'. Change-Id: I892e0a4e1b41a7a87adf54a5736abf7419f32979 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6648 Tested-by: jenkins
Diffstat (limited to 'src/jtag/aice')
-rw-r--r--src/jtag/aice/aice_interface.c22
-rw-r--r--src/jtag/aice/aice_port.h2
2 files changed, 2 insertions, 22 deletions
diff --git a/src/jtag/aice/aice_interface.c b/src/jtag/aice/aice_interface.c
index c7556c0..cb126c6 100644
--- a/src/jtag/aice/aice_interface.c
+++ b/src/jtag/aice/aice_interface.c
@@ -20,6 +20,7 @@
#include "config.h"
#endif
+#include <jtag/adapter.h>
#include <jtag/interface.h>
#include <jtag/commands.h>
#include <transport/transport.h>
@@ -269,7 +270,7 @@ COMMAND_HANDLER(aice_handle_aice_info_command)
LOG_DEBUG("aice_handle_aice_info_command");
command_print(CMD, "Description: %s", param.device_desc);
- command_print(CMD, "Serial number: %s", param.serial);
+ command_print(CMD, "Serial number: %s", adapter_get_required_serial());
if (strncmp(aice_port->name, "aice_pipe", 9) == 0)
command_print(CMD, "Adapter: %s", param.adapter_name);
@@ -308,18 +309,6 @@ COMMAND_HANDLER(aice_handle_aice_desc_command)
return ERROR_OK;
}
-COMMAND_HANDLER(aice_handle_aice_serial_command)
-{
- LOG_DEBUG("aice_handle_aice_serial_command");
-
- if (CMD_ARGC == 1)
- param.serial = strdup(CMD_ARGV[0]);
- else
- LOG_ERROR("expected exactly one argument to aice serial <serial-number>");
-
- return ERROR_OK;
-}
-
COMMAND_HANDLER(aice_handle_aice_vid_pid_command)
{
LOG_DEBUG("aice_handle_aice_vid_pid_command");
@@ -439,13 +428,6 @@ static const struct command_registration aice_subcommand_handlers[] = {
.usage = "[description string]",
},
{
- .name = "serial",
- .handler = &aice_handle_aice_serial_command,
- .mode = COMMAND_CONFIG,
- .help = "set the serial number of the AICE device",
- .usage = "[serial string]",
- },
- {
.name = "vid_pid",
.handler = &aice_handle_aice_vid_pid_command,
.mode = COMMAND_CONFIG,
diff --git a/src/jtag/aice/aice_port.h b/src/jtag/aice/aice_port.h
index d3d6a1a..1593688 100644
--- a/src/jtag/aice/aice_port.h
+++ b/src/jtag/aice/aice_port.h
@@ -107,8 +107,6 @@ struct aice_port_param_s {
/** */
const char *device_desc;
/** */
- const char *serial;
- /** */
uint16_t vid;
/** */
uint16_t pid;