aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2018-08-04 14:49:35 +0200
committerMatthias Welwarsky <matthias@welwarsky.de>2018-09-10 11:55:43 +0100
commit2253a31fb19cbc501fd8e54bfd43310c35dacd4b (patch)
tree324bac2772f4addb0f30ae4742029d0356c947f4
parent9e2883b07d1574f00e13ab97447606b1fe6b844e (diff)
downloadriscv-openocd-2253a31fb19cbc501fd8e54bfd43310c35dacd4b.zip
riscv-openocd-2253a31fb19cbc501fd8e54bfd43310c35dacd4b.tar.gz
riscv-openocd-2253a31fb19cbc501fd8e54bfd43310c35dacd4b.tar.bz2
ftdi: extend ftdi_location format
To existing <bus>:<port>,<port> format add <bus>-<port>.<port> support. The last format is used by kernel and other drivers. Change-Id: I6528970d3af4f6a8bf7b27a0f7a763b5957fdf2b Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-on: http://openocd.zylin.com/4631 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
-rw-r--r--src/jtag/drivers/mpsse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/drivers/mpsse.c b/src/jtag/drivers/mpsse.c
index 06d008b..8924892 100644
--- a/src/jtag/drivers/mpsse.c
+++ b/src/jtag/drivers/mpsse.c
@@ -120,7 +120,7 @@ static bool device_location_equal(libusb_device *device, const char *location)
LOG_DEBUG("device path has %i steps", path_len);
- ptr = strtok(loc, ":");
+ ptr = strtok(loc, "-:");
if (ptr == NULL) {
LOG_DEBUG("no ':' in path");
goto done;
@@ -132,7 +132,7 @@ static bool device_location_equal(libusb_device *device, const char *location)
path_step = 0;
while (path_step < 7) {
- ptr = strtok(NULL, ",");
+ ptr = strtok(NULL, ".,");
if (ptr == NULL) {
LOG_DEBUG("no more tokens in path at step %i", path_step);
break;