mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
adapter: switch from struct jtag_interface to adapter_driver
To reorganize the adapters code, introduce an adapter_driver struct that contains all the adapter generic part, while keeping in two separate struct the specific API jtag_ops and swd_ops. Move the allocation of *adapter_driver from the JTAG-specific file core.c to the more adapter-specific file adapter.c While splitting the old jtag_interface for every driver, put the fields in the same order as in the struct declaration so we keep a consistent code across all the drivers. While other transport specific API could/would be added as separate ops, nothing is done here for HLA. Change-Id: I2d60f97ac514c0dd2d93a6ec9be66fd9d388dad5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/4900 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Tomas Vanek
parent
7268ff22c3
commit
efd1d64222
@@ -46,7 +46,7 @@
|
||||
* Holds support for configuring debug adapters from TCl scripts.
|
||||
*/
|
||||
|
||||
extern struct jtag_interface *jtag_interface;
|
||||
struct adapter_driver *adapter_driver;
|
||||
const char * const jtag_only[] = { "jtag", NULL };
|
||||
|
||||
static int jim_adapter_name(Jim_Interp *interp, int argc, Jim_Obj * const *argv)
|
||||
@@ -61,7 +61,7 @@ static int jim_adapter_name(Jim_Interp *interp, int argc, Jim_Obj * const *argv)
|
||||
Jim_WrongNumArgs(goi.interp, 1, goi.argv-1, "(no params)");
|
||||
return JIM_ERR;
|
||||
}
|
||||
const char *name = jtag_interface ? jtag_interface->name : NULL;
|
||||
const char *name = adapter_driver ? adapter_driver->name : NULL;
|
||||
Jim_SetResultString(goi.interp, name ? : "undefined", -1);
|
||||
return JIM_OK;
|
||||
}
|
||||
@@ -91,8 +91,8 @@ COMMAND_HANDLER(handle_interface_list_command)
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
|
||||
command_print(CMD, "The following debug interfaces are available:");
|
||||
for (unsigned i = 0; NULL != jtag_interfaces[i]; i++) {
|
||||
const char *name = jtag_interfaces[i]->name;
|
||||
for (unsigned i = 0; NULL != adapter_drivers[i]; i++) {
|
||||
const char *name = adapter_drivers[i]->name;
|
||||
command_print(CMD, "%u: %s", i + 1, name);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ COMMAND_HANDLER(handle_interface_command)
|
||||
int retval;
|
||||
|
||||
/* check whether the interface is already configured */
|
||||
if (jtag_interface) {
|
||||
if (adapter_driver) {
|
||||
LOG_WARNING("Interface already configured, ignoring");
|
||||
return ERROR_OK;
|
||||
}
|
||||
@@ -113,20 +113,20 @@ COMMAND_HANDLER(handle_interface_command)
|
||||
if (CMD_ARGC != 1 || CMD_ARGV[0][0] == '\0')
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
|
||||
for (unsigned i = 0; NULL != jtag_interfaces[i]; i++) {
|
||||
if (strcmp(CMD_ARGV[0], jtag_interfaces[i]->name) != 0)
|
||||
for (unsigned i = 0; NULL != adapter_drivers[i]; i++) {
|
||||
if (strcmp(CMD_ARGV[0], adapter_drivers[i]->name) != 0)
|
||||
continue;
|
||||
|
||||
if (NULL != jtag_interfaces[i]->commands) {
|
||||
if (NULL != adapter_drivers[i]->commands) {
|
||||
retval = register_commands(CMD_CTX, NULL,
|
||||
jtag_interfaces[i]->commands);
|
||||
adapter_drivers[i]->commands);
|
||||
if (ERROR_OK != retval)
|
||||
return retval;
|
||||
}
|
||||
|
||||
jtag_interface = jtag_interfaces[i];
|
||||
adapter_driver = adapter_drivers[i];
|
||||
|
||||
return allow_transports(CMD_CTX, jtag_interface->transports);
|
||||
return allow_transports(CMD_CTX, adapter_driver->transports);
|
||||
}
|
||||
|
||||
/* no valid interface was found (i.e. the configuration option,
|
||||
|
||||
@@ -518,14 +518,20 @@ static const struct command_registration aice_command_handlers[] = {
|
||||
/***************************************************************************/
|
||||
/* End of Command handlers */
|
||||
|
||||
struct jtag_interface aice_interface = {
|
||||
static struct jtag_interface aice_interface = {
|
||||
.execute_queue = aice_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver aice_adapter_driver = {
|
||||
.name = "aice",
|
||||
.commands = aice_command_handlers,
|
||||
.transports = aice_transports,
|
||||
.commands = aice_command_handlers,
|
||||
|
||||
.init = aice_init,
|
||||
.quit = aice_quit,
|
||||
.execute_queue = aice_execute_queue,
|
||||
.speed = aice_speed, /* set interface speed */
|
||||
.speed_div = aice_speed_div, /* return readable value */
|
||||
.khz = aice_khz, /* convert khz to interface speed value */
|
||||
.speed_div = aice_speed_div, /* return readable value */
|
||||
|
||||
.jtag_ops = &aice_interface,
|
||||
};
|
||||
|
||||
@@ -126,10 +126,10 @@ static int rclk_fallback_speed_khz;
|
||||
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)
|
||||
{
|
||||
@@ -503,7 +503,7 @@ int jtag_add_tms_seq(unsigned nbits, const uint8_t *seq, enum tap_state state)
|
||||
{
|
||||
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();
|
||||
@@ -946,11 +946,11 @@ int default_interface_jtag_execute_queue(void)
|
||||
* 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.
|
||||
@@ -1518,7 +1518,7 @@ int adapter_init(struct command_context *cmd_ctx)
|
||||
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");
|
||||
@@ -1526,10 +1526,10 @@ int adapter_init(struct command_context *cmd_ctx)
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
@@ -584,7 +584,11 @@ static const struct command_registration amtjtagaccel_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct jtag_interface amt_jtagaccel_interface = {
|
||||
static struct jtag_interface amt_jtagaccel_interface = {
|
||||
.execute_queue = amt_jtagaccel_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver amt_jtagaccel_adapter_driver = {
|
||||
.name = "amt_jtagaccel",
|
||||
.transports = jtag_only,
|
||||
.commands = amtjtagaccel_command_handlers,
|
||||
@@ -592,5 +596,6 @@ struct jtag_interface amt_jtagaccel_interface = {
|
||||
.init = amt_jtagaccel_init,
|
||||
.quit = amt_jtagaccel_quit,
|
||||
.speed = amt_jtagaccel_speed,
|
||||
.execute_queue = amt_jtagaccel_execute_queue,
|
||||
|
||||
.jtag_ops = &amt_jtagaccel_interface,
|
||||
};
|
||||
|
||||
@@ -495,16 +495,22 @@ static const struct command_registration armjtagew_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct jtag_interface armjtagew_interface = {
|
||||
.name = "arm-jtag-ew",
|
||||
.commands = armjtagew_command_handlers,
|
||||
.transports = jtag_only,
|
||||
static struct jtag_interface armjtagew_interface = {
|
||||
.execute_queue = armjtagew_execute_queue,
|
||||
.speed = armjtagew_speed,
|
||||
.speed_div = armjtagew_speed_div,
|
||||
.khz = armjtagew_khz,
|
||||
};
|
||||
|
||||
struct adapter_driver armjtagew_adapter_driver = {
|
||||
.name = "arm-jtag-ew",
|
||||
.transports = jtag_only,
|
||||
.commands = armjtagew_command_handlers,
|
||||
|
||||
.init = armjtagew_init,
|
||||
.quit = armjtagew_quit,
|
||||
.speed = armjtagew_speed,
|
||||
.khz = armjtagew_khz,
|
||||
.speed_div = armjtagew_speed_div,
|
||||
|
||||
.jtag_ops = &armjtagew_interface,
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
|
||||
@@ -187,14 +187,20 @@ static const struct command_registration at91rm9200_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct jtag_interface at91rm9200_interface = {
|
||||
.name = "at91rm9200",
|
||||
static struct jtag_interface at91rm9200_interface = {
|
||||
.execute_queue = bitbang_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver at91rm9200_adapter_driver = {
|
||||
.name = "at91rm9200",
|
||||
.transports = jtag_only,
|
||||
.commands = at91rm9200_command_handlers,
|
||||
|
||||
.init = at91rm9200_init,
|
||||
.quit = at91rm9200_quit,
|
||||
.reset = at91rm9200_reset,
|
||||
|
||||
.jtag_ops = &at91rm9200_interface,
|
||||
};
|
||||
|
||||
static int at91rm9200_init(void)
|
||||
|
||||
@@ -405,19 +405,25 @@ static const struct command_registration bcm2835gpio_command_handlers[] = {
|
||||
|
||||
static const char * const bcm2835_transports[] = { "jtag", "swd", NULL };
|
||||
|
||||
struct jtag_interface bcm2835gpio_interface = {
|
||||
.name = "bcm2835gpio",
|
||||
static struct jtag_interface bcm2835gpio_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.execute_queue = bitbang_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver bcm2835gpio_adapter_driver = {
|
||||
.name = "bcm2835gpio",
|
||||
.transports = bcm2835_transports,
|
||||
.swd = &bitbang_swd,
|
||||
.speed = bcm2835gpio_speed,
|
||||
.khz = bcm2835gpio_khz,
|
||||
.speed_div = bcm2835gpio_speed_div,
|
||||
.commands = bcm2835gpio_command_handlers,
|
||||
|
||||
.init = bcm2835gpio_init,
|
||||
.quit = bcm2835gpio_quit,
|
||||
.reset = bcm2835gpio_reset,
|
||||
.speed = bcm2835gpio_speed,
|
||||
.khz = bcm2835gpio_khz,
|
||||
.speed_div = bcm2835gpio_speed_div,
|
||||
|
||||
.jtag_ops = &bcm2835gpio_interface,
|
||||
.swd_ops = &bitbang_swd,
|
||||
};
|
||||
|
||||
static bool bcm2835gpio_jtag_mode_possible(void)
|
||||
|
||||
@@ -536,15 +536,21 @@ static const struct swd_driver buspirate_swd = {
|
||||
|
||||
static const char * const buspirate_transports[] = { "jtag", "swd", NULL };
|
||||
|
||||
struct jtag_interface buspirate_interface = {
|
||||
.name = "buspirate",
|
||||
static struct jtag_interface buspirate_interface = {
|
||||
.execute_queue = buspirate_execute_queue,
|
||||
.commands = buspirate_command_handlers,
|
||||
};
|
||||
|
||||
struct adapter_driver buspirate_adapter_driver = {
|
||||
.name = "buspirate",
|
||||
.transports = buspirate_transports,
|
||||
.swd = &buspirate_swd,
|
||||
.commands = buspirate_command_handlers,
|
||||
|
||||
.init = buspirate_init,
|
||||
.quit = buspirate_quit,
|
||||
.reset = buspirate_reset,
|
||||
|
||||
.jtag_ops = &buspirate_interface,
|
||||
.swd_ops = &buspirate_swd,
|
||||
};
|
||||
|
||||
/*************** jtag execute commands **********************/
|
||||
|
||||
@@ -1786,18 +1786,23 @@ static const struct swd_driver cmsis_dap_swd_driver = {
|
||||
|
||||
static const char * const cmsis_dap_transport[] = { "swd", "jtag", NULL };
|
||||
|
||||
struct jtag_interface cmsis_dap_interface = {
|
||||
.name = "cmsis-dap",
|
||||
static struct jtag_interface cmsis_dap_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.commands = cmsis_dap_command_handlers,
|
||||
.swd = &cmsis_dap_swd_driver,
|
||||
.transports = cmsis_dap_transport,
|
||||
|
||||
.execute_queue = cmsis_dap_execute_queue,
|
||||
.speed = cmsis_dap_speed,
|
||||
.speed_div = cmsis_dap_speed_div,
|
||||
.khz = cmsis_dap_khz,
|
||||
};
|
||||
|
||||
struct adapter_driver cmsis_dap_adapter_driver = {
|
||||
.name = "cmsis-dap",
|
||||
.transports = cmsis_dap_transport,
|
||||
.commands = cmsis_dap_command_handlers,
|
||||
|
||||
.init = cmsis_dap_init,
|
||||
.quit = cmsis_dap_quit,
|
||||
.reset = cmsis_dap_reset,
|
||||
.speed = cmsis_dap_speed,
|
||||
.khz = cmsis_dap_khz,
|
||||
.speed_div = cmsis_dap_speed_div,
|
||||
|
||||
.jtag_ops = &cmsis_dap_interface,
|
||||
.swd_ops = &cmsis_dap_swd_driver,
|
||||
};
|
||||
|
||||
@@ -144,20 +144,22 @@ static const struct command_registration dummy_command_handlers[] = {
|
||||
/* The dummy driver is used to easily check the code path
|
||||
* where the target is unresponsive.
|
||||
*/
|
||||
struct jtag_interface dummy_interface = {
|
||||
.name = "dummy",
|
||||
static struct jtag_interface dummy_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.execute_queue = &bitbang_execute_queue,
|
||||
};
|
||||
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.commands = dummy_command_handlers,
|
||||
.transports = jtag_only,
|
||||
struct adapter_driver dummy_adapter_driver = {
|
||||
.name = "dummy",
|
||||
.transports = jtag_only,
|
||||
.commands = dummy_command_handlers,
|
||||
|
||||
.execute_queue = &bitbang_execute_queue,
|
||||
.init = &dummy_init,
|
||||
.quit = &dummy_quit,
|
||||
.reset = &dummy_reset,
|
||||
.speed = &dummy_speed,
|
||||
.khz = &dummy_khz,
|
||||
.speed_div = &dummy_speed_div,
|
||||
|
||||
.speed = &dummy_speed,
|
||||
.khz = &dummy_khz,
|
||||
.speed_div = &dummy_speed_div,
|
||||
|
||||
.init = &dummy_init,
|
||||
.quit = &dummy_quit,
|
||||
.reset = &dummy_reset,
|
||||
};
|
||||
.jtag_ops = &dummy_interface,
|
||||
};
|
||||
|
||||
@@ -50,16 +50,20 @@ static int ep93xx_quit(void);
|
||||
|
||||
struct timespec ep93xx_zzzz;
|
||||
|
||||
struct jtag_interface ep93xx_interface = {
|
||||
.name = "ep93xx",
|
||||
|
||||
static struct jtag_interface ep93xx_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.execute_queue = bitbang_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver ep93xx_adapter_driver = {
|
||||
.name = "ep93xx",
|
||||
.transports = jtag_only,
|
||||
|
||||
.init = ep93xx_init,
|
||||
.quit = ep93xx_quit,
|
||||
.reset = ep93xx_reset,
|
||||
|
||||
.jtag_ops = &ep93xx_interface,
|
||||
};
|
||||
|
||||
static struct bitbang_interface ep93xx_bitbang = {
|
||||
|
||||
@@ -914,17 +914,21 @@ static int syncbb_execute_queue(void)
|
||||
return retval;
|
||||
}
|
||||
|
||||
struct jtag_interface ft232r_interface = {
|
||||
.name = "ft232r",
|
||||
.commands = ft232r_command_handlers,
|
||||
.transports = jtag_only,
|
||||
static struct jtag_interface ft232r_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
|
||||
.execute_queue = syncbb_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver ft232r_adapter_driver = {
|
||||
.name = "ft232r",
|
||||
.transports = jtag_only,
|
||||
.commands = ft232r_command_handlers,
|
||||
|
||||
.speed = ft232r_speed,
|
||||
.init = ft232r_init,
|
||||
.quit = ft232r_quit,
|
||||
.speed_div = ft232r_speed_div,
|
||||
.speed = ft232r_speed,
|
||||
.khz = ft232r_khz,
|
||||
.speed_div = ft232r_speed_div,
|
||||
|
||||
.jtag_ops = &ft232r_interface,
|
||||
};
|
||||
|
||||
@@ -1231,18 +1231,23 @@ static const struct swd_driver ftdi_swd = {
|
||||
|
||||
static const char * const ftdi_transports[] = { "jtag", "swd", NULL };
|
||||
|
||||
struct jtag_interface ftdi_interface = {
|
||||
.name = "ftdi",
|
||||
static struct jtag_interface ftdi_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.commands = ftdi_command_handlers,
|
||||
.execute_queue = ftdi_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver ftdi_adapter_driver = {
|
||||
.name = "ftdi",
|
||||
.transports = ftdi_transports,
|
||||
.swd = &ftdi_swd,
|
||||
.commands = ftdi_command_handlers,
|
||||
|
||||
.init = ftdi_initialize,
|
||||
.quit = ftdi_quit,
|
||||
.reset = ftdi_reset,
|
||||
.speed = ftdi_speed,
|
||||
.speed_div = ftdi_speed_div,
|
||||
.khz = ftdi_khz,
|
||||
.execute_queue = ftdi_execute_queue,
|
||||
.speed_div = ftdi_speed_div,
|
||||
|
||||
.jtag_ops = &ftdi_interface,
|
||||
.swd_ops = &ftdi_swd,
|
||||
};
|
||||
|
||||
@@ -521,12 +521,17 @@ static const struct command_registration gw16012_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct jtag_interface gw16012_interface = {
|
||||
static struct jtag_interface gw16012_interface = {
|
||||
.execute_queue = gw16012_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver gw16012_adapter_driver = {
|
||||
.name = "gw16012",
|
||||
.transports = jtag_only,
|
||||
.commands = gw16012_command_handlers,
|
||||
|
||||
.init = gw16012_init,
|
||||
.quit = gw16012_quit,
|
||||
.execute_queue = gw16012_execute_queue,
|
||||
|
||||
.jtag_ops = &gw16012_interface,
|
||||
};
|
||||
|
||||
@@ -427,19 +427,25 @@ static const struct command_registration imx_gpio_command_handlers[] = {
|
||||
|
||||
static const char * const imx_gpio_transports[] = { "jtag", "swd", NULL };
|
||||
|
||||
struct jtag_interface imx_gpio_interface = {
|
||||
.name = "imx_gpio",
|
||||
static struct jtag_interface imx_gpio_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.execute_queue = bitbang_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver imx_gpio_adapter_driver = {
|
||||
.name = "imx_gpio",
|
||||
.transports = imx_gpio_transports,
|
||||
.swd = &bitbang_swd,
|
||||
.speed = imx_gpio_speed,
|
||||
.khz = imx_gpio_khz,
|
||||
.speed_div = imx_gpio_speed_div,
|
||||
.commands = imx_gpio_command_handlers,
|
||||
|
||||
.init = imx_gpio_init,
|
||||
.quit = imx_gpio_quit,
|
||||
.reset = imx_gpio_reset,
|
||||
.speed = imx_gpio_speed,
|
||||
.khz = imx_gpio_khz,
|
||||
.speed_div = imx_gpio_speed_div,
|
||||
|
||||
.jtag_ops = &imx_gpio_interface,
|
||||
.swd_ops = &bitbang_swd,
|
||||
};
|
||||
|
||||
static bool imx_gpio_jtag_mode_possible(void)
|
||||
|
||||
@@ -2267,18 +2267,24 @@ static const struct swd_driver jlink_swd = {
|
||||
|
||||
static const char * const jlink_transports[] = { "jtag", "swd", NULL };
|
||||
|
||||
struct jtag_interface jlink_interface = {
|
||||
.name = "jlink",
|
||||
.commands = jlink_command_handlers,
|
||||
.transports = jlink_transports,
|
||||
.swd = &jlink_swd,
|
||||
static struct jtag_interface jlink_interface = {
|
||||
.execute_queue = &jlink_execute_queue,
|
||||
.speed = &jlink_speed,
|
||||
.speed_div = &jlink_speed_div,
|
||||
.khz = &jlink_khz,
|
||||
};
|
||||
|
||||
struct adapter_driver jlink_adapter_driver = {
|
||||
.name = "jlink",
|
||||
.transports = jlink_transports,
|
||||
.commands = jlink_command_handlers,
|
||||
|
||||
.init = &jlink_init,
|
||||
.quit = &jlink_quit,
|
||||
.reset = &jlink_reset_safe,
|
||||
.speed = &jlink_speed,
|
||||
.khz = &jlink_khz,
|
||||
.speed_div = &jlink_speed_div,
|
||||
.config_trace = &config_trace,
|
||||
.poll_trace = &poll_trace,
|
||||
|
||||
.jtag_ops = &jlink_interface,
|
||||
.swd_ops = &jlink_swd,
|
||||
};
|
||||
|
||||
@@ -627,13 +627,18 @@ static const struct command_registration jtag_vpi_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct jtag_interface jtag_vpi_interface = {
|
||||
.name = "jtag_vpi",
|
||||
static struct jtag_interface jtag_vpi_interface = {
|
||||
.supported = DEBUG_CAP_TMS_SEQ,
|
||||
.commands = jtag_vpi_command_handlers,
|
||||
.execute_queue = jtag_vpi_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver jtag_vpi_adapter_driver = {
|
||||
.name = "jtag_vpi",
|
||||
.transports = jtag_only,
|
||||
.commands = jtag_vpi_command_handlers,
|
||||
|
||||
.init = jtag_vpi_init,
|
||||
.quit = jtag_vpi_quit,
|
||||
.execute_queue = jtag_vpi_execute_queue,
|
||||
|
||||
.jtag_ops = &jtag_vpi_interface,
|
||||
};
|
||||
|
||||
@@ -935,12 +935,14 @@ static const struct swd_driver kitprog_swd = {
|
||||
|
||||
static const char * const kitprog_transports[] = { "swd", NULL };
|
||||
|
||||
struct jtag_interface kitprog_interface = {
|
||||
struct adapter_driver kitprog_adapter_driver = {
|
||||
.name = "kitprog",
|
||||
.commands = kitprog_command_handlers,
|
||||
.transports = kitprog_transports,
|
||||
.swd = &kitprog_swd,
|
||||
.commands = kitprog_command_handlers,
|
||||
|
||||
.init = kitprog_init,
|
||||
.quit = kitprog_quit,
|
||||
.reset = kitprog_reset,
|
||||
|
||||
.swd_ops = &kitprog_swd,
|
||||
};
|
||||
|
||||
@@ -234,13 +234,19 @@ static const struct command_registration opendous_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct jtag_interface opendous_interface = {
|
||||
static struct jtag_interface opendous_interface = {
|
||||
.execute_queue = opendous_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver opendous_adapter_driver = {
|
||||
.name = "opendous",
|
||||
.transports = jtag_only,
|
||||
.commands = opendous_command_handlers,
|
||||
.execute_queue = opendous_execute_queue,
|
||||
|
||||
.init = opendous_init,
|
||||
.quit = opendous_quit,
|
||||
|
||||
.jtag_ops = &opendous_interface,
|
||||
};
|
||||
|
||||
static int opendous_execute_queue(void)
|
||||
|
||||
@@ -892,17 +892,20 @@ static const struct command_registration openjtag_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct jtag_interface openjtag_interface = {
|
||||
static struct jtag_interface openjtag_interface = {
|
||||
.execute_queue = openjtag_execute_queue,
|
||||
};
|
||||
|
||||
struct adapter_driver openjtag_adapter_driver = {
|
||||
.name = "openjtag",
|
||||
.transports = jtag_only,
|
||||
.commands = openjtag_command_handlers,
|
||||
|
||||
.execute_queue = openjtag_execute_queue,
|
||||
.speed = openjtag_speed,
|
||||
.speed_div = openjtag_speed_div,
|
||||
.khz = openjtag_khz,
|
||||
.init = openjtag_init,
|
||||
.quit = openjtag_quit,
|
||||
.speed = openjtag_speed,
|
||||
.khz = openjtag_khz,
|
||||
.speed_div = openjtag_speed_div,
|
||||
|
||||
.jtag_ops = &openjtag_interface,
|
||||
};
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user