jtag/ftdi: switch to command 'adapter serial'
The driver ftdi defines the command 'ftdi serial' to specify the serial string of the adapter. Remove and deprecate the driver command, and use 'adapter serial'. Change-Id: Ia5b1f325b9fab8f58b5ea70f8b807e50b148b939 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6651 Tested-by: jenkins
This commit is contained in:
@@ -90,7 +90,6 @@
|
||||
#define SWD_MODE (LSB_FIRST | POS_EDGE_IN | NEG_EDGE_OUT)
|
||||
|
||||
static char *ftdi_device_desc;
|
||||
static char *ftdi_serial;
|
||||
static uint8_t ftdi_channel;
|
||||
static uint8_t ftdi_jtag_mode = JTAG_MODE;
|
||||
|
||||
@@ -672,7 +671,7 @@ static int ftdi_initialize(void)
|
||||
|
||||
for (int i = 0; ftdi_vid[i] || ftdi_pid[i]; i++) {
|
||||
mpsse_ctx = mpsse_open(&ftdi_vid[i], &ftdi_pid[i], ftdi_device_desc,
|
||||
ftdi_serial, adapter_usb_get_location(), ftdi_channel);
|
||||
adapter_get_required_serial(), adapter_usb_get_location(), ftdi_channel);
|
||||
if (mpsse_ctx)
|
||||
break;
|
||||
}
|
||||
@@ -717,7 +716,6 @@ static int ftdi_quit(void)
|
||||
}
|
||||
|
||||
free(ftdi_device_desc);
|
||||
free(ftdi_serial);
|
||||
|
||||
free(swd_cmd_queue);
|
||||
|
||||
@@ -736,18 +734,6 @@ COMMAND_HANDLER(ftdi_handle_device_desc_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
COMMAND_HANDLER(ftdi_handle_serial_command)
|
||||
{
|
||||
if (CMD_ARGC == 1) {
|
||||
free(ftdi_serial);
|
||||
ftdi_serial = strdup(CMD_ARGV[0]);
|
||||
} else {
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
}
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
COMMAND_HANDLER(ftdi_handle_channel_command)
|
||||
{
|
||||
if (CMD_ARGC == 1)
|
||||
@@ -955,13 +941,6 @@ static const struct command_registration ftdi_subcommand_handlers[] = {
|
||||
.help = "set the USB device description of the FTDI device",
|
||||
.usage = "description_string",
|
||||
},
|
||||
{
|
||||
.name = "serial",
|
||||
.handler = &ftdi_handle_serial_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.help = "set the serial number of the FTDI device",
|
||||
.usage = "serial_string",
|
||||
},
|
||||
{
|
||||
.name = "channel",
|
||||
.handler = &ftdi_handle_channel_command,
|
||||
|
||||
Reference in New Issue
Block a user