jtag: set default "jtag_only" to uninitialized transports
For legacy support, drivers that do not define a list of transports get identified as jtag_only. Cleanup this old crust and initialize properly the transports field in the jtag_interface for all the drivers. Change-Id: I9c86064e5d05bd0212bc18f4424414e615e617fe Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/4893 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>bscan_optimization
parent
0cba5b4ea3
commit
159f11fefc
|
@ -126,16 +126,7 @@ COMMAND_HANDLER(handle_interface_command)
|
||||||
|
|
||||||
jtag_interface = jtag_interfaces[i];
|
jtag_interface = jtag_interfaces[i];
|
||||||
|
|
||||||
/* LEGACY SUPPORT ... adapter drivers must declare what
|
return allow_transports(CMD_CTX, jtag_interface->transports);
|
||||||
* transports they allow. Until they all do so, assume
|
|
||||||
* the legacy drivers are JTAG-only
|
|
||||||
*/
|
|
||||||
if (!jtag_interface->transports)
|
|
||||||
LOG_WARNING("Adapter driver '%s' did not declare "
|
|
||||||
"which transports it allows; assuming "
|
|
||||||
"legacy JTAG-only", jtag_interface->name);
|
|
||||||
return allow_transports(CMD_CTX, jtag_interface->transports
|
|
||||||
? jtag_interface->transports : jtag_only);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no valid interface was found (i.e. the configuration option,
|
/* no valid interface was found (i.e. the configuration option,
|
||||||
|
|
|
@ -1348,19 +1348,6 @@ int adapter_init(struct command_context *cmd_ctx)
|
||||||
return retval;
|
return retval;
|
||||||
jtag = jtag_interface;
|
jtag = jtag_interface;
|
||||||
|
|
||||||
/* LEGACY SUPPORT ... adapter drivers must declare what
|
|
||||||
* transports they allow. Until they all do so, assume
|
|
||||||
* the legacy drivers are JTAG-only
|
|
||||||
*/
|
|
||||||
if (!transports_are_declared()) {
|
|
||||||
LOG_ERROR("Adapter driver '%s' did not declare "
|
|
||||||
"which transports it allows; assuming "
|
|
||||||
"JTAG-only", jtag->name);
|
|
||||||
retval = allow_transports(cmd_ctx, jtag_only);
|
|
||||||
if (retval != ERROR_OK)
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (jtag->speed == NULL) {
|
if (jtag->speed == NULL) {
|
||||||
LOG_INFO("This adapter doesn't support configurable speed");
|
LOG_INFO("This adapter doesn't support configurable speed");
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
|
|
|
@ -586,6 +586,7 @@ static const struct command_registration amtjtagaccel_command_handlers[] = {
|
||||||
|
|
||||||
struct jtag_interface amt_jtagaccel_interface = {
|
struct jtag_interface amt_jtagaccel_interface = {
|
||||||
.name = "amt_jtagaccel",
|
.name = "amt_jtagaccel",
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = amtjtagaccel_command_handlers,
|
.commands = amtjtagaccel_command_handlers,
|
||||||
|
|
||||||
.init = amt_jtagaccel_init,
|
.init = amt_jtagaccel_init,
|
||||||
|
|
|
@ -192,6 +192,7 @@ static const struct command_registration at91rm9200_command_handlers[] = {
|
||||||
struct jtag_interface at91rm9200_interface = {
|
struct jtag_interface at91rm9200_interface = {
|
||||||
.name = "at91rm9200",
|
.name = "at91rm9200",
|
||||||
.execute_queue = bitbang_execute_queue,
|
.execute_queue = bitbang_execute_queue,
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = at91rm9200_command_handlers,
|
.commands = at91rm9200_command_handlers,
|
||||||
.init = at91rm9200_init,
|
.init = at91rm9200_init,
|
||||||
.quit = at91rm9200_quit,
|
.quit = at91rm9200_quit,
|
||||||
|
|
|
@ -55,6 +55,7 @@ struct jtag_interface ep93xx_interface = {
|
||||||
|
|
||||||
.supported = DEBUG_CAP_TMS_SEQ,
|
.supported = DEBUG_CAP_TMS_SEQ,
|
||||||
.execute_queue = bitbang_execute_queue,
|
.execute_queue = bitbang_execute_queue,
|
||||||
|
.transports = jtag_only,
|
||||||
|
|
||||||
.init = ep93xx_init,
|
.init = ep93xx_init,
|
||||||
.quit = ep93xx_quit,
|
.quit = ep93xx_quit,
|
||||||
|
|
|
@ -523,6 +523,7 @@ static const struct command_registration gw16012_command_handlers[] = {
|
||||||
|
|
||||||
struct jtag_interface gw16012_interface = {
|
struct jtag_interface gw16012_interface = {
|
||||||
.name = "gw16012",
|
.name = "gw16012",
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = gw16012_command_handlers,
|
.commands = gw16012_command_handlers,
|
||||||
|
|
||||||
.init = gw16012_init,
|
.init = gw16012_init,
|
||||||
|
|
|
@ -236,6 +236,7 @@ static const struct command_registration opendous_command_handlers[] = {
|
||||||
|
|
||||||
struct jtag_interface opendous_interface = {
|
struct jtag_interface opendous_interface = {
|
||||||
.name = "opendous",
|
.name = "opendous",
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = opendous_command_handlers,
|
.commands = opendous_command_handlers,
|
||||||
.execute_queue = opendous_execute_queue,
|
.execute_queue = opendous_execute_queue,
|
||||||
.init = opendous_init,
|
.init = opendous_init,
|
||||||
|
|
|
@ -894,6 +894,7 @@ static const struct command_registration openjtag_command_handlers[] = {
|
||||||
|
|
||||||
struct jtag_interface openjtag_interface = {
|
struct jtag_interface openjtag_interface = {
|
||||||
.name = "openjtag",
|
.name = "openjtag",
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = openjtag_command_handlers,
|
.commands = openjtag_command_handlers,
|
||||||
|
|
||||||
.execute_queue = openjtag_execute_queue,
|
.execute_queue = openjtag_execute_queue,
|
||||||
|
|
|
@ -517,6 +517,7 @@ static const struct command_registration parport_command_handlers[] = {
|
||||||
struct jtag_interface parport_interface = {
|
struct jtag_interface parport_interface = {
|
||||||
.name = "parport",
|
.name = "parport",
|
||||||
.supported = DEBUG_CAP_TMS_SEQ,
|
.supported = DEBUG_CAP_TMS_SEQ,
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = parport_command_handlers,
|
.commands = parport_command_handlers,
|
||||||
|
|
||||||
.init = parport_init,
|
.init = parport_init,
|
||||||
|
|
|
@ -563,6 +563,7 @@ static int presto_jtag_quit(void)
|
||||||
|
|
||||||
struct jtag_interface presto_interface = {
|
struct jtag_interface presto_interface = {
|
||||||
.name = "presto",
|
.name = "presto",
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = presto_command_handlers,
|
.commands = presto_command_handlers,
|
||||||
|
|
||||||
.execute_queue = bitq_execute_queue,
|
.execute_queue = bitq_execute_queue,
|
||||||
|
|
|
@ -345,6 +345,7 @@ static const struct command_registration remote_bitbang_command_handlers[] = {
|
||||||
struct jtag_interface remote_bitbang_interface = {
|
struct jtag_interface remote_bitbang_interface = {
|
||||||
.name = "remote_bitbang",
|
.name = "remote_bitbang",
|
||||||
.execute_queue = &bitbang_execute_queue,
|
.execute_queue = &bitbang_execute_queue,
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = remote_bitbang_command_handlers,
|
.commands = remote_bitbang_command_handlers,
|
||||||
.init = &remote_bitbang_init,
|
.init = &remote_bitbang_init,
|
||||||
.quit = &remote_bitbang_quit,
|
.quit = &remote_bitbang_quit,
|
||||||
|
|
|
@ -1662,6 +1662,7 @@ static int rlink_quit(void)
|
||||||
|
|
||||||
struct jtag_interface rlink_interface = {
|
struct jtag_interface rlink_interface = {
|
||||||
.name = "rlink",
|
.name = "rlink",
|
||||||
|
.transports = jtag_only,
|
||||||
.init = rlink_init,
|
.init = rlink_init,
|
||||||
.quit = rlink_quit,
|
.quit = rlink_quit,
|
||||||
.speed = rlink_speed,
|
.speed = rlink_speed,
|
||||||
|
|
|
@ -1068,6 +1068,7 @@ static const struct command_registration ublast_command_handlers[] = {
|
||||||
|
|
||||||
struct jtag_interface usb_blaster_interface = {
|
struct jtag_interface usb_blaster_interface = {
|
||||||
.name = "usb_blaster",
|
.name = "usb_blaster",
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = ublast_command_handlers,
|
.commands = ublast_command_handlers,
|
||||||
.supported = DEBUG_CAP_TMS_SEQ,
|
.supported = DEBUG_CAP_TMS_SEQ,
|
||||||
|
|
||||||
|
|
|
@ -598,6 +598,7 @@ static void usbprog_jtag_tms_send(struct usbprog_jtag *usbprog_jtag)
|
||||||
|
|
||||||
struct jtag_interface usbprog_interface = {
|
struct jtag_interface usbprog_interface = {
|
||||||
.name = "usbprog",
|
.name = "usbprog",
|
||||||
|
.transports = jtag_only,
|
||||||
|
|
||||||
.execute_queue = usbprog_execute_queue,
|
.execute_queue = usbprog_execute_queue,
|
||||||
.init = usbprog_init,
|
.init = usbprog_init,
|
||||||
|
|
|
@ -28,6 +28,7 @@ struct jtag_interface minidummy_interface = {
|
||||||
.name = "minidummy",
|
.name = "minidummy",
|
||||||
.execute_queue = NULL,
|
.execute_queue = NULL,
|
||||||
.speed = NULL,
|
.speed = NULL,
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = NULL,
|
.commands = NULL,
|
||||||
.init = NULL,
|
.init = NULL,
|
||||||
.quit = NULL,
|
.quit = NULL,
|
||||||
|
|
|
@ -1242,6 +1242,7 @@ struct jtag_interface zy1000_interface = {
|
||||||
.supported = DEBUG_CAP_TMS_SEQ,
|
.supported = DEBUG_CAP_TMS_SEQ,
|
||||||
.execute_queue = NULL,
|
.execute_queue = NULL,
|
||||||
.speed = zy1000_speed,
|
.speed = zy1000_speed,
|
||||||
|
.transports = jtag_only,
|
||||||
.commands = zy1000_commands,
|
.commands = zy1000_commands,
|
||||||
.init = zy1000_init,
|
.init = zy1000_init,
|
||||||
.quit = zy1000_quit,
|
.quit = zy1000_quit,
|
||||||
|
|
Loading…
Reference in New Issue