static enum {CLOCK_MODE_UNSELECTED, CLOCK_MODE_KHZ, CLOCK_MODE_RCLK} clock_mode;
static int jtag_speed;
-static struct jtag_interface *jtag;
+/* FIXME: change name to this variable, it is not anymore JTAG only */
+static struct adapter_driver *jtag;
-/* configuration */
-struct jtag_interface *jtag_interface;
+extern struct adapter_driver *adapter_driver;
void jtag_set_flush_queue_sleep(int ms)
{
{
int retval;
- if (!(jtag->supported & DEBUG_CAP_TMS_SEQ))
+ if (!(jtag->jtag_ops->supported & DEBUG_CAP_TMS_SEQ))
return ERROR_JTAG_NOT_IMPLEMENTED;
jtag_checks();
* The fix can be applied immediately after next release (v0.11.0 ?)
*/
LOG_ERROR("JTAG API jtag_execute_queue() called on non JTAG interface");
- if (!jtag->execute_queue)
+ if (!jtag->jtag_ops || !jtag->jtag_ops->execute_queue)
return ERROR_OK;
}
- int result = jtag->execute_queue();
+ int result = jtag->jtag_ops->execute_queue();
#if !BUILD_ZY1000
/* Only build this if we use a regular driver with a command queue.
if (jtag)
return ERROR_OK;
- if (!jtag_interface) {
+ if (!adapter_driver) {
/* nothing was previously specified by "interface" command */
LOG_ERROR("Debug Adapter has to be specified, "
"see \"interface\" command");
}
int retval;
- retval = jtag_interface->init();
+ retval = adapter_driver->init();
if (retval != ERROR_OK)
return retval;
- jtag = jtag_interface;
+ jtag = adapter_driver;
if (jtag->speed == NULL) {
LOG_INFO("This adapter doesn't support configurable speed");