summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomek CEDRO <cederom@tlen.pl>2011-11-12 15:58:48 +0000
committerTomek CEDRO <cederom@tlen.pl>2011-11-12 15:58:48 +0000
commit60ec860968768f05180937da9b8ddcaf7a061224 (patch)
treed98330b666b777d4603ef484a0ab3da3e303f46d
parentbe7702685e5819a6744cdaae283ebe25be9bdec4 (diff)
downloadopenocd_libswd-60ec860968768f05180937da9b8ddcaf7a061224.tar.gz
openocd_libswd-60ec860968768f05180937da9b8ddcaf7a061224.tar.bz2
openocd_libswd-60ec860968768f05180937da9b8ddcaf7a061224.tar.xz
openocd_libswd-60ec860968768f05180937da9b8ddcaf7a061224.zip
transport: Transport init now fills jtag_interface->transport value, so both SWD and JTAG work again.
-rw-r--r--src/transport/transport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/transport.c b/src/transport/transport.c
index 99d5f6a4..554fb42a 100644
--- a/src/transport/transport.c
+++ b/src/transport/transport.c
@@ -49,6 +49,9 @@
extern struct command_context *global_cmd_ctx;
+//TC: Adding global here in order to set transport when initialized.
+extern struct jtag_interface *jtag_interface;
+
/*-----------------------------------------------------------------------*/
@@ -266,6 +269,9 @@ COMMAND_HANDLER(handle_transport_init)
return ERROR_FAIL;
}
+ //TC: Transport needs to be set in jtag_interface structure.
+ //jtag_interface is still global, need to move it into context.
+ jtag_interface->transport = session_transport;
return session_transport->init(CMD_CTX);
}