summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomek CEDRO <cederom@tlen.pl>2011-06-25 14:27:00 +0200
committerTomek CEDRO <cederom@tlen.pl>2011-06-25 14:27:00 +0200
commitdc647115408c78ad39ed76fb12bf6cf7db7254fa (patch)
treee8e4354137e0f47d4a9f044012be74fd29043d76
parent2c7b391eb3179f6c095890741214afcf8dc6ff29 (diff)
downloadopenocd_libswd-dc647115408c78ad39ed76fb12bf6cf7db7254fa.tar.gz
openocd_libswd-dc647115408c78ad39ed76fb12bf6cf7db7254fa.tar.bz2
openocd_libswd-dc647115408c78ad39ed76fb12bf6cf7db7254fa.tar.xz
openocd_libswd-dc647115408c78ad39ed76fb12bf6cf7db7254fa.zip
INTERFACE/FT2232: 'ft2232_swd' interface was created and added to the list of supported interfaces (as for now it is in the list jtag_interfaces, maybe should be separated or the interface list renamed into more general).
-rw-r--r--src/jtag/drivers/ft2232.c16
-rw-r--r--src/jtag/interfaces.c12
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,