X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fjtag%2Fdrivers%2Fftdi.c;h=b709d28daaa678ffb1fd1c153ef49e0367e98579;hp=7c6709cd5b6273f082baf44b533fb5d3527e4712;hb=b04c7c2ca587feebd6506716cd84297212350608;hpb=ff23980434b3be523853034c71e61662303aa742 diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c index 7c6709cd5b..b709d28daa 100644 --- a/src/jtag/drivers/ftdi.c +++ b/src/jtag/drivers/ftdi.c @@ -69,6 +69,7 @@ #endif /* project specific includes */ +#include #include #include #include @@ -89,7 +90,6 @@ static char *ftdi_device_desc; static char *ftdi_serial; -static char *ftdi_location; static uint8_t ftdi_channel; static uint8_t ftdi_jtag_mode = JTAG_MODE; @@ -439,11 +439,11 @@ static void ftdi_execute_scan(struct jtag_command *cmd) while (cmd->cmd.scan->num_fields > 0 && cmd->cmd.scan->fields[cmd->cmd.scan->num_fields - 1].num_bits == 0) { cmd->cmd.scan->num_fields--; - LOG_DEBUG("discarding trailing empty field"); + DEBUG_JTAG_IO("discarding trailing empty field"); } if (cmd->cmd.scan->num_fields == 0) { - LOG_DEBUG("empty scan, doing nothing"); + DEBUG_JTAG_IO("empty scan, doing nothing"); return; } @@ -658,7 +658,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, ftdi_location, ftdi_channel); + ftdi_serial, jtag_usb_get_location(), ftdi_channel); if (mpsse_ctx) break; } @@ -704,7 +704,6 @@ static int ftdi_quit(void) free(ftdi_device_desc); free(ftdi_serial); - free(ftdi_location); free(swd_cmd_queue); @@ -737,21 +736,6 @@ COMMAND_HANDLER(ftdi_handle_serial_command) return ERROR_OK; } -#ifdef HAVE_LIBUSB_GET_PORT_NUMBERS -COMMAND_HANDLER(ftdi_handle_location_command) -{ - if (CMD_ARGC == 1) { - if (ftdi_location) - free(ftdi_location); - ftdi_location = strdup(CMD_ARGV[0]); - } else { - return ERROR_COMMAND_SYNTAX_ERROR; - } - - return ERROR_OK; -} -#endif - COMMAND_HANDLER(ftdi_handle_channel_command) { if (CMD_ARGC == 1) @@ -966,15 +950,6 @@ static const struct command_registration ftdi_command_handlers[] = { .help = "set the serial number of the FTDI device", .usage = "serial_string", }, -#ifdef HAVE_LIBUSB_GET_PORT_NUMBERS - { - .name = "ftdi_location", - .handler = &ftdi_handle_location_command, - .mode = COMMAND_CONFIG, - .help = "set the USB bus location of the FTDI device", - .usage = ":port[,port]...", - }, -#endif { .name = "ftdi_channel", .handler = &ftdi_handle_channel_command,