aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2019-01-22 16:03:15 +0100
committerTomas Vanek <vanekt@fbl.cz>2019-06-06 16:45:31 +0100
commit159f11fefc194743a0af6e29e134b184bf26650d (patch)
tree98840b35b80ab4da5b5ff453b6245e97c6dcee2f /src
parent0cba5b4ea30a436e1ab381b374ea89743a23e09c (diff)
downloadriscv-openocd-159f11fefc194743a0af6e29e134b184bf26650d.zip
riscv-openocd-159f11fefc194743a0af6e29e134b184bf26650d.tar.gz
riscv-openocd-159f11fefc194743a0af6e29e134b184bf26650d.tar.bz2
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>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/adapter.c11
-rw-r--r--src/jtag/core.c13
-rw-r--r--src/jtag/drivers/amt_jtagaccel.c1
-rw-r--r--src/jtag/drivers/at91rm9200.c1
-rw-r--r--src/jtag/drivers/ep93xx.c1
-rw-r--r--src/jtag/drivers/gw16012.c1
-rw-r--r--src/jtag/drivers/opendous.c1
-rw-r--r--src/jtag/drivers/openjtag.c1
-rw-r--r--src/jtag/drivers/parport.c1
-rw-r--r--src/jtag/drivers/presto.c1
-rw-r--r--src/jtag/drivers/remote_bitbang.c1
-rw-r--r--src/jtag/drivers/rlink.c1
-rw-r--r--src/jtag/drivers/usb_blaster/usb_blaster.c1
-rw-r--r--src/jtag/drivers/usbprog.c1
-rw-r--r--src/jtag/minidummy/minidummy.c1
-rw-r--r--src/jtag/zy1000/zy1000.c1
16 files changed, 15 insertions, 23 deletions
diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c
index b1be28e..29a9613 100644
--- a/src/jtag/adapter.c
+++ b/src/jtag/adapter.c
@@ -126,16 +126,7 @@ COMMAND_HANDLER(handle_interface_command)
jtag_interface = jtag_interfaces[i];
- /* LEGACY SUPPORT ... adapter drivers must declare what
- * 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);
+ return allow_transports(CMD_CTX, jtag_interface->transports);
}
/* no valid interface was found (i.e. the configuration option,
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 84e9396..18956f2 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1348,19 +1348,6 @@ int adapter_init(struct command_context *cmd_ctx)
return retval;
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) {
LOG_INFO("This adapter doesn't support configurable speed");
return ERROR_OK;
diff --git a/src/jtag/drivers/amt_jtagaccel.c b/src/jtag/drivers/amt_jtagaccel.c
index d6864c2..045672f 100644
--- a/src/jtag/drivers/amt_jtagaccel.c
+++ b/src/jtag/drivers/amt_jtagaccel.c
@@ -586,6 +586,7 @@ static const struct command_registration amtjtagaccel_command_handlers[] = {
struct jtag_interface amt_jtagaccel_interface = {
.name = "amt_jtagaccel",
+ .transports = jtag_only,
.commands = amtjtagaccel_command_handlers,
.init = amt_jtagaccel_init,
diff --git a/src/jtag/drivers/at91rm9200.c b/src/jtag/drivers/at91rm9200.c
index 0360ec5..ac65563 100644
--- a/src/jtag/drivers/at91rm9200.c
+++ b/src/jtag/drivers/at91rm9200.c
@@ -192,6 +192,7 @@ static const struct command_registration at91rm9200_command_handlers[] = {
struct jtag_interface at91rm9200_interface = {
.name = "at91rm9200",
.execute_queue = bitbang_execute_queue,
+ .transports = jtag_only,
.commands = at91rm9200_command_handlers,
.init = at91rm9200_init,
.quit = at91rm9200_quit,
diff --git a/src/jtag/drivers/ep93xx.c b/src/jtag/drivers/ep93xx.c
index 36fc777..4cf3184 100644
--- a/src/jtag/drivers/ep93xx.c
+++ b/src/jtag/drivers/ep93xx.c
@@ -55,6 +55,7 @@ struct jtag_interface ep93xx_interface = {
.supported = DEBUG_CAP_TMS_SEQ,
.execute_queue = bitbang_execute_queue,
+ .transports = jtag_only,
.init = ep93xx_init,
.quit = ep93xx_quit,
diff --git a/src/jtag/drivers/gw16012.c b/src/jtag/drivers/gw16012.c
index 2971d46..e65f56c 100644
--- a/src/jtag/drivers/gw16012.c
+++ b/src/jtag/drivers/gw16012.c
@@ -523,6 +523,7 @@ static const struct command_registration gw16012_command_handlers[] = {
struct jtag_interface gw16012_interface = {
.name = "gw16012",
+ .transports = jtag_only,
.commands = gw16012_command_handlers,
.init = gw16012_init,
diff --git a/src/jtag/drivers/opendous.c b/src/jtag/drivers/opendous.c
index c0595bf..5f352af 100644
--- a/src/jtag/drivers/opendous.c
+++ b/src/jtag/drivers/opendous.c
@@ -236,6 +236,7 @@ static const struct command_registration opendous_command_handlers[] = {
struct jtag_interface opendous_interface = {
.name = "opendous",
+ .transports = jtag_only,
.commands = opendous_command_handlers,
.execute_queue = opendous_execute_queue,
.init = opendous_init,
diff --git a/src/jtag/drivers/openjtag.c b/src/jtag/drivers/openjtag.c
index 2ca8254..7a3aa23 100644
--- a/src/jtag/drivers/openjtag.c
+++ b/src/jtag/drivers/openjtag.c
@@ -894,6 +894,7 @@ static const struct command_registration openjtag_command_handlers[] = {
struct jtag_interface openjtag_interface = {
.name = "openjtag",
+ .transports = jtag_only,
.commands = openjtag_command_handlers,
.execute_queue = openjtag_execute_queue,
diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c
index 0e7992f..8e44dcb 100644
--- a/src/jtag/drivers/parport.c
+++ b/src/jtag/drivers/parport.c
@@ -517,6 +517,7 @@ static const struct command_registration parport_command_handlers[] = {
struct jtag_interface parport_interface = {
.name = "parport",
.supported = DEBUG_CAP_TMS_SEQ,
+ .transports = jtag_only,
.commands = parport_command_handlers,
.init = parport_init,
diff --git a/src/jtag/drivers/presto.c b/src/jtag/drivers/presto.c
index 29bc811..2a94d06 100644
--- a/src/jtag/drivers/presto.c
+++ b/src/jtag/drivers/presto.c
@@ -563,6 +563,7 @@ static int presto_jtag_quit(void)
struct jtag_interface presto_interface = {
.name = "presto",
+ .transports = jtag_only,
.commands = presto_command_handlers,
.execute_queue = bitq_execute_queue,
diff --git a/src/jtag/drivers/remote_bitbang.c b/src/jtag/drivers/remote_bitbang.c
index 1f8fc1a..a354894 100644
--- a/src/jtag/drivers/remote_bitbang.c
+++ b/src/jtag/drivers/remote_bitbang.c
@@ -345,6 +345,7 @@ static const struct command_registration remote_bitbang_command_handlers[] = {
struct jtag_interface remote_bitbang_interface = {
.name = "remote_bitbang",
.execute_queue = &bitbang_execute_queue,
+ .transports = jtag_only,
.commands = remote_bitbang_command_handlers,
.init = &remote_bitbang_init,
.quit = &remote_bitbang_quit,
diff --git a/src/jtag/drivers/rlink.c b/src/jtag/drivers/rlink.c
index 70f8734..317e8b8 100644
--- a/src/jtag/drivers/rlink.c
+++ b/src/jtag/drivers/rlink.c
@@ -1662,6 +1662,7 @@ static int rlink_quit(void)
struct jtag_interface rlink_interface = {
.name = "rlink",
+ .transports = jtag_only,
.init = rlink_init,
.quit = rlink_quit,
.speed = rlink_speed,
diff --git a/src/jtag/drivers/usb_blaster/usb_blaster.c b/src/jtag/drivers/usb_blaster/usb_blaster.c
index 55b511e..165ebdc 100644
--- a/src/jtag/drivers/usb_blaster/usb_blaster.c
+++ b/src/jtag/drivers/usb_blaster/usb_blaster.c
@@ -1068,6 +1068,7 @@ static const struct command_registration ublast_command_handlers[] = {
struct jtag_interface usb_blaster_interface = {
.name = "usb_blaster",
+ .transports = jtag_only,
.commands = ublast_command_handlers,
.supported = DEBUG_CAP_TMS_SEQ,
diff --git a/src/jtag/drivers/usbprog.c b/src/jtag/drivers/usbprog.c
index bcbaff8..35a9520 100644
--- a/src/jtag/drivers/usbprog.c
+++ b/src/jtag/drivers/usbprog.c
@@ -598,6 +598,7 @@ static void usbprog_jtag_tms_send(struct usbprog_jtag *usbprog_jtag)
struct jtag_interface usbprog_interface = {
.name = "usbprog",
+ .transports = jtag_only,
.execute_queue = usbprog_execute_queue,
.init = usbprog_init,
diff --git a/src/jtag/minidummy/minidummy.c b/src/jtag/minidummy/minidummy.c
index b7c989f..2f26004 100644
--- a/src/jtag/minidummy/minidummy.c
+++ b/src/jtag/minidummy/minidummy.c
@@ -28,6 +28,7 @@ struct jtag_interface minidummy_interface = {
.name = "minidummy",
.execute_queue = NULL,
.speed = NULL,
+ .transports = jtag_only,
.commands = NULL,
.init = NULL,
.quit = NULL,
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c
index 4e53dd1..1734983 100644
--- a/src/jtag/zy1000/zy1000.c
+++ b/src/jtag/zy1000/zy1000.c
@@ -1242,6 +1242,7 @@ struct jtag_interface zy1000_interface = {
.supported = DEBUG_CAP_TMS_SEQ,
.execute_queue = NULL,
.speed = zy1000_speed,
+ .transports = jtag_only,
.commands = zy1000_commands,
.init = zy1000_init,
.quit = zy1000_quit,