ADAPTER: Fixed transport selection mechanism to support transports other than jtag (if defined).

This commit is contained in:
Tomek CEDRO 2011-06-16 06:54:58 +00:00 committed by Øyvind Harboe
parent 9f40d41f68
commit 37d5ac6378
1 changed files with 3 additions and 8 deletions

View File

@ -47,8 +47,7 @@
*/ */
extern struct jtag_interface *jtag_interface; extern struct jtag_interface *jtag_interface;
const char *jtag_only[] = { "jtag", NULL };
static int static int
jim_adapter_name(Jim_Interp *interp, int argc, Jim_Obj *const *argv) jim_adapter_name(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
@ -93,9 +92,6 @@ static int default_srst_asserted(int *srst_asserted)
return ERROR_OK; return ERROR_OK;
} }
const char *jtag_only[] = { "jtag", NULL, };
COMMAND_HANDLER(interface_transport_command) COMMAND_HANDLER(interface_transport_command)
{ {
char **transports; char **transports;
@ -169,9 +165,8 @@ COMMAND_HANDLER(handle_interface_command)
LOG_WARNING("Adapter driver '%s' did not declare " LOG_WARNING("Adapter driver '%s' did not declare "
"which transports it allows; assuming " "which transports it allows; assuming "
"legacy JTAG-only", jtag_interface->name); "legacy JTAG-only", jtag_interface->name);
retval = allow_transports(CMD_CTX, retval = allow_transports(CMD_CTX, jtag_interface->transports
jtag_interface->transports ? jtag_interface->transports : jtag_only);
? : jtag_only);
if (ERROR_OK != retval) if (ERROR_OK != retval)
return retval; return retval;