diff options
-rw-r--r-- | src/jtag/drivers/ft2232.c | 16 | ||||
-rw-r--r-- | src/jtag/interfaces.c | 12 |
2 files changed, 24 insertions, 4 deletions
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c index 8ceaa645..f37dd09a 100644 --- a/src/jtag/drivers/ft2232.c +++ b/src/jtag/drivers/ft2232.c @@ -4693,3 +4693,19 @@ struct jtag_interface ft2232_interface = { .execute_queue = ft2232_execute_queue, .bitbang = ft2232_bitbang, }; + +struct jtag_interface ft2232_interface_swd = { + .name = "ft2232_swd", + .supported = DEBUG_CAP_TMS_SEQ, + .commands = ft2232_command_handlers, + .transports = oocd_transport_swd_only, + + .init = ft2232_init, + .quit = ft2232_quit, + .speed = ft2232_speed, + .speed_div = ft2232_speed_div, + .khz = ft2232_khz, + .transfer = ft2232_transfer, + .bitbang = ft2232_bitbang, +}; + diff --git a/src/jtag/interfaces.c b/src/jtag/interfaces.c index 8d13a086..59ea0b65 100644 --- a/src/jtag/interfaces.c +++ b/src/jtag/interfaces.c @@ -53,10 +53,10 @@ extern struct jtag_interface parport_interface; extern struct jtag_interface dummy_interface; #endif #if BUILD_FT2232_FTD2XX == 1 -extern struct jtag_interface ft2232_interface; +extern struct jtag_interface ft2232_interface, ft2232_interface_swd; #endif #if BUILD_FT2232_LIBFTDI == 1 -extern struct jtag_interface ft2232_interface; +extern struct jtag_interface ft2232_interface, ft2232_interface_swd; #endif #if BUILD_USB_BLASTER_LIBFTDI == 1 || BUILD_USB_BLASTER_FTD2XX == 1 extern struct jtag_interface usb_blaster_interface; @@ -102,6 +102,10 @@ extern struct jtag_interface buspirate_interface; * * The list should be defined to contain either one minidriver interface * or some number of standard driver interfaces, never both. + * + * TC: This list also contain swd interface. To be verified is separate list + * is necessary, or rename jtag_interfaces into oocd_interfaces (and use + * transport layer list to select and initialize proper transport... */ struct jtag_interface *jtag_interfaces[] = { #if BUILD_ZY1000 == 1 @@ -116,10 +120,10 @@ struct jtag_interface *jtag_interfaces[] = { &dummy_interface, #endif #if BUILD_FT2232_FTD2XX == 1 - &ft2232_interface, + &ft2232_interface, &ft2232_interface_swd, #endif #if BUILD_FT2232_LIBFTDI == 1 - &ft2232_interface, + &ft2232_interface, &ft2232_interface_swd, #endif #if BUILD_USB_BLASTER_LIBFTDI == 1 || BUILD_USB_BLASTER_FTD2XX == 1 &usb_blaster_interface, |