You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

193 lines
6.1 KiB

  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, write to the *
  27. * Free Software Foundation, Inc., *
  28. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  29. ***************************************************************************/
  30. #ifdef HAVE_CONFIG_H
  31. #include "config.h"
  32. #endif
  33. #include "interfaces.h"
  34. /** @file
  35. * This file includes declarations for all built-in jtag interfaces,
  36. * which are then listed in the jtag_interfaces array.
  37. *
  38. * Dynamic loading can be implemented be searching for shared libraries
  39. * that contain a jtag_interface structure that can added to this list.
  40. */
  41. #if BUILD_ZY1000 == 1
  42. extern struct jtag_interface zy1000_interface;
  43. #elif defined(BUILD_MINIDRIVER_DUMMY)
  44. extern struct jtag_interface minidummy_interface;
  45. #else /* standard drivers */
  46. #if BUILD_PARPORT == 1
  47. extern struct jtag_interface parport_interface;
  48. #endif
  49. #if BUILD_DUMMY == 1
  50. extern struct jtag_interface dummy_interface;
  51. #endif
  52. #if BUILD_FT2232_FTD2XX == 1
  53. extern struct jtag_interface ft2232_interface;
  54. #endif
  55. #if BUILD_FT2232_LIBFTDI == 1
  56. extern struct jtag_interface ft2232_interface;
  57. #endif
  58. #if BUILD_USB_BLASTER_LIBFTDI == 1 || BUILD_USB_BLASTER_FTD2XX == 1
  59. extern struct jtag_interface usb_blaster_interface;
  60. #endif
  61. #if BUILD_AMTJTAGACCEL == 1
  62. extern struct jtag_interface amt_jtagaccel_interface;
  63. #endif
  64. #if BUILD_EP93XX == 1
  65. extern struct jtag_interface ep93xx_interface;
  66. #endif
  67. #if BUILD_AT91RM9200 == 1
  68. extern struct jtag_interface at91rm9200_interface;
  69. #endif
  70. #if BUILD_GW16012 == 1
  71. extern struct jtag_interface gw16012_interface;
  72. #endif
  73. #if BUILD_PRESTO_LIBFTDI == 1 || BUILD_PRESTO_FTD2XX == 1
  74. extern struct jtag_interface presto_interface;
  75. #endif
  76. #if BUILD_USBPROG == 1
  77. extern struct jtag_interface usbprog_interface;
  78. #endif
  79. #if BUILD_JLINK == 1
  80. extern struct jtag_interface jlink_interface;
  81. #endif
  82. #if BUILD_VSLLINK == 1
  83. extern struct jtag_interface vsllink_interface;
  84. #endif
  85. #if BUILD_RLINK == 1
  86. extern struct jtag_interface rlink_interface;
  87. #endif
  88. #if BUILD_ULINK == 1
  89. extern struct jtag_interface ulink_interface;
  90. #endif
  91. #if BUILD_ARMJTAGEW == 1
  92. extern struct jtag_interface armjtagew_interface;
  93. #endif
  94. #if BUILD_BUSPIRATE == 1
  95. extern struct jtag_interface buspirate_interface;
  96. #endif
  97. #if BUILD_REMOTE_BITBANG == 1
  98. extern struct jtag_interface remote_bitbang_interface;
  99. #endif
  100. #if BUILD_STLINK == 1
  101. extern struct jtag_interface stlink_interface;
  102. #endif
  103. #if BUILD_OSBDM == 1
  104. extern struct jtag_interface osbdm_interface;
  105. #endif
  106. #endif /* standard drivers */
  107. /**
  108. * The list of built-in JTAG interfaces, containing entries for those
  109. * drivers that were enabled by the @c configure script.
  110. *
  111. * The list should be defined to contain either one minidriver interface
  112. * or some number of standard driver interfaces, never both.
  113. */
  114. struct jtag_interface *jtag_interfaces[] = {
  115. #if BUILD_ZY1000 == 1
  116. &zy1000_interface,
  117. #elif defined(BUILD_MINIDRIVER_DUMMY)
  118. &minidummy_interface,
  119. #else /* standard drivers */
  120. #if BUILD_PARPORT == 1
  121. &parport_interface,
  122. #endif
  123. #if BUILD_DUMMY == 1
  124. &dummy_interface,
  125. #endif
  126. #if BUILD_FT2232_FTD2XX == 1
  127. &ft2232_interface,
  128. #endif
  129. #if BUILD_FT2232_LIBFTDI == 1
  130. &ft2232_interface,
  131. #endif
  132. #if BUILD_USB_BLASTER_LIBFTDI == 1 || BUILD_USB_BLASTER_FTD2XX == 1
  133. &usb_blaster_interface,
  134. #endif
  135. #if BUILD_AMTJTAGACCEL == 1
  136. &amt_jtagaccel_interface,
  137. #endif
  138. #if BUILD_EP93XX == 1
  139. &ep93xx_interface,
  140. #endif
  141. #if BUILD_AT91RM9200 == 1
  142. &at91rm9200_interface,
  143. #endif
  144. #if BUILD_GW16012 == 1
  145. &gw16012_interface,
  146. #endif
  147. #if BUILD_PRESTO_LIBFTDI == 1 || BUILD_PRESTO_FTD2XX == 1
  148. &presto_interface,
  149. #endif
  150. #if BUILD_USBPROG == 1
  151. &usbprog_interface,
  152. #endif
  153. #if BUILD_JLINK == 1
  154. &jlink_interface,
  155. #endif
  156. #if BUILD_VSLLINK == 1
  157. &vsllink_interface,
  158. #endif
  159. #if BUILD_RLINK == 1
  160. &rlink_interface,
  161. #endif
  162. #if BUILD_ULINK == 1
  163. &ulink_interface,
  164. #endif
  165. #if BUILD_ARMJTAGEW == 1
  166. &armjtagew_interface,
  167. #endif
  168. #if BUILD_BUSPIRATE == 1
  169. &buspirate_interface,
  170. #endif
  171. #if BUILD_REMOTE_BITBANG == 1
  172. &remote_bitbang_interface,
  173. #endif
  174. #if BUILD_STLINK == 1
  175. &stlink_interface,
  176. #endif
  177. #if BUILD_OSBDM == 1
  178. &osbdm_interface,
  179. #endif
  180. #endif /* standard drivers */
  181. NULL,
  182. };
  183. void jtag_interface_modules_load(const char *path)
  184. {
  185. /* @todo: implement dynamic module loading for JTAG interface drivers */
  186. }