Remove FSF address from GPL notices
[openocd.git] / src / jtag / interfaces.c
blob64fdd71d615bf7b8af55738942b2e343155f1b12
1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath *
3 * Dominic.Rath@gmx.de *
4 * *
5 * Copyright (C) 2007,2008 Øyvind Harboe *
6 * oyvind.harboe@zylin.com *
7 * *
8 * Copyright (C) 2009 SoftPLC Corporation *
9 * http://softplc.com *
10 * dick@softplc.com *
11 * *
12 * Copyright (C) 2009 Zachary T Welch *
13 * zw@superlucidity.net *
14 * *
15 * This program is free software; you can redistribute it and/or modify *
16 * it under the terms of the GNU General Public License as published by *
17 * the Free Software Foundation; either version 2 of the License, or *
18 * (at your option) any later version. *
19 * *
20 * This program is distributed in the hope that it will be useful, *
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
23 * GNU General Public License for more details. *
24 * *
25 * You should have received a copy of the GNU General Public License *
26 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
27 ***************************************************************************/
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
33 #include "interfaces.h"
35 /** @file
36 * This file includes declarations for all built-in jtag interfaces,
37 * which are then listed in the jtag_interfaces array.
39 * Dynamic loading can be implemented be searching for shared libraries
40 * that contain a jtag_interface structure that can added to this list.
43 #if BUILD_ZY1000 == 1
44 extern struct jtag_interface zy1000_interface;
45 #elif defined(BUILD_MINIDRIVER_DUMMY)
46 extern struct jtag_interface minidummy_interface;
47 #else /* standard drivers */
48 #if BUILD_PARPORT == 1
49 extern struct jtag_interface parport_interface;
50 #endif
51 #if BUILD_DUMMY == 1
52 extern struct jtag_interface dummy_interface;
53 #endif
54 #if BUILD_FT2232_FTD2XX == 1
55 extern struct jtag_interface ft2232_interface;
56 #endif
57 #if BUILD_FT2232_LIBFTDI == 1
58 extern struct jtag_interface ft2232_interface;
59 #endif
60 #if BUILD_FTDI == 1
61 extern struct jtag_interface ftdi_interface;
62 #endif
63 #if BUILD_USB_BLASTER_LIBFTDI == 1 || BUILD_USB_BLASTER_FTD2XX == 1 || BUILD_USB_BLASTER_2 == 1
64 extern struct jtag_interface usb_blaster_interface;
65 #endif
66 #if BUILD_JTAG_VPI == 1
67 extern struct jtag_interface jtag_vpi_interface;
68 #endif
69 #if BUILD_AMTJTAGACCEL == 1
70 extern struct jtag_interface amt_jtagaccel_interface;
71 #endif
72 #if BUILD_EP93XX == 1
73 extern struct jtag_interface ep93xx_interface;
74 #endif
75 #if BUILD_AT91RM9200 == 1
76 extern struct jtag_interface at91rm9200_interface;
77 #endif
78 #if BUILD_GW16012 == 1
79 extern struct jtag_interface gw16012_interface;
80 #endif
81 #if BUILD_PRESTO_LIBFTDI == 1 || BUILD_PRESTO_FTD2XX == 1
82 extern struct jtag_interface presto_interface;
83 #endif
84 #if BUILD_USBPROG == 1
85 extern struct jtag_interface usbprog_interface;
86 #endif
87 #if BUILD_OPENJTAG == 1
88 extern struct jtag_interface openjtag_interface;
89 #endif
90 #if BUILD_JLINK == 1
91 extern struct jtag_interface jlink_interface;
92 #endif
93 #if BUILD_VSLLINK == 1
94 extern struct jtag_interface vsllink_interface;
95 #endif
96 #if BUILD_RLINK == 1
97 extern struct jtag_interface rlink_interface;
98 #endif
99 #if BUILD_ULINK == 1
100 extern struct jtag_interface ulink_interface;
101 #endif
102 #if BUILD_ARMJTAGEW == 1
103 extern struct jtag_interface armjtagew_interface;
104 #endif
105 #if BUILD_BUSPIRATE == 1
106 extern struct jtag_interface buspirate_interface;
107 #endif
108 #if BUILD_REMOTE_BITBANG == 1
109 extern struct jtag_interface remote_bitbang_interface;
110 #endif
111 #if BUILD_HLADAPTER == 1
112 extern struct jtag_interface hl_interface;
113 #endif
114 #if BUILD_OSBDM == 1
115 extern struct jtag_interface osbdm_interface;
116 #endif
117 #if BUILD_OPENDOUS == 1
118 extern struct jtag_interface opendous_interface;
119 #endif
120 #if BUILD_SYSFSGPIO == 1
121 extern struct jtag_interface sysfsgpio_interface;
122 #endif
123 #if BUILD_AICE == 1
124 extern struct jtag_interface aice_interface;
125 #endif
126 #if BUILD_BCM2835GPIO == 1
127 extern struct jtag_interface bcm2835gpio_interface;
128 #endif
129 #if BUILD_CMSIS_DAP == 1
130 extern struct jtag_interface cmsis_dap_interface;
131 #endif
132 #endif /* standard drivers */
135 * The list of built-in JTAG interfaces, containing entries for those
136 * drivers that were enabled by the @c configure script.
138 * The list should be defined to contain either one minidriver interface
139 * or some number of standard driver interfaces, never both.
141 struct jtag_interface *jtag_interfaces[] = {
142 #if BUILD_ZY1000 == 1
143 &zy1000_interface,
144 #elif defined(BUILD_MINIDRIVER_DUMMY)
145 &minidummy_interface,
146 #else /* standard drivers */
147 #if BUILD_PARPORT == 1
148 &parport_interface,
149 #endif
150 #if BUILD_DUMMY == 1
151 &dummy_interface,
152 #endif
153 #if BUILD_FT2232_FTD2XX == 1
154 &ft2232_interface,
155 #endif
156 #if BUILD_FT2232_LIBFTDI == 1
157 &ft2232_interface,
158 #endif
159 #if BUILD_FTDI == 1
160 &ftdi_interface,
161 #endif
162 #if BUILD_USB_BLASTER_LIBFTDI == 1 || BUILD_USB_BLASTER_FTD2XX == 1 || BUILD_USB_BLASTER_2 == 1
163 &usb_blaster_interface,
164 #endif
165 #if BUILD_JTAG_VPI == 1
166 &jtag_vpi_interface,
167 #endif
168 #if BUILD_AMTJTAGACCEL == 1
169 &amt_jtagaccel_interface,
170 #endif
171 #if BUILD_EP93XX == 1
172 &ep93xx_interface,
173 #endif
174 #if BUILD_AT91RM9200 == 1
175 &at91rm9200_interface,
176 #endif
177 #if BUILD_GW16012 == 1
178 &gw16012_interface,
179 #endif
180 #if BUILD_PRESTO_LIBFTDI == 1 || BUILD_PRESTO_FTD2XX == 1
181 &presto_interface,
182 #endif
183 #if BUILD_USBPROG == 1
184 &usbprog_interface,
185 #endif
186 #if BUILD_OPENJTAG == 1
187 &openjtag_interface,
188 #endif
189 #if BUILD_JLINK == 1
190 &jlink_interface,
191 #endif
192 #if BUILD_VSLLINK == 1
193 &vsllink_interface,
194 #endif
195 #if BUILD_RLINK == 1
196 &rlink_interface,
197 #endif
198 #if BUILD_ULINK == 1
199 &ulink_interface,
200 #endif
201 #if BUILD_ARMJTAGEW == 1
202 &armjtagew_interface,
203 #endif
204 #if BUILD_BUSPIRATE == 1
205 &buspirate_interface,
206 #endif
207 #if BUILD_REMOTE_BITBANG == 1
208 &remote_bitbang_interface,
209 #endif
210 #if BUILD_HLADAPTER == 1
211 &hl_interface,
212 #endif
213 #if BUILD_OSBDM == 1
214 &osbdm_interface,
215 #endif
216 #if BUILD_OPENDOUS == 1
217 &opendous_interface,
218 #endif
219 #if BUILD_SYSFSGPIO == 1
220 &sysfsgpio_interface,
221 #endif
222 #if BUILD_AICE == 1
223 &aice_interface,
224 #endif
225 #if BUILD_BCM2835GPIO == 1
226 &bcm2835gpio_interface,
227 #endif
228 #if BUILD_CMSIS_DAP == 1
229 &cmsis_dap_interface,
230 #endif
231 #endif /* standard drivers */
232 NULL,
235 void jtag_interface_modules_load(const char *path)
237 /* @todo: implement dynamic module loading for JTAG interface drivers */