diff options
author | Franck Jullien <franck.jullien@gmail.com> | 2013-02-03 18:15:13 +0100 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2013-02-08 22:33:19 +0000 |
commit | 87668aebf1851c06af2513ab5f27ebb9ebf1ff16 (patch) | |
tree | 5f8fad191256e26517b18166b0a276bdd708b3eb /src/jtag/core.c | |
parent | feddedb6db72b81714780fae5d0b3a51dc1ddedc (diff) |
jtag_interface: .speed can be NULL when not needed
adapter_init (core.c) won't check speed configuration
of the selected interface if it's not needed (.speed = NULL).
When it's not needed, we can now omit adapter_khz in
init scripts and we don't have to implement dummy handlers
for speed_div and khz functions.
It also removes calls to adapter_khz in interface configuration
files when not used anymore.
Change-Id: I6eb1894385503fede542a368f297cec6565eed44
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Reviewed-on: http://openocd.zylin.com/1131
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src/jtag/core.c')
-rw-r--r-- | src/jtag/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c index 9f1e4cf0..86ba706b 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -1371,6 +1371,11 @@ int adapter_init(struct command_context *cmd_ctx) return retval; } + if (jtag->speed == NULL) { + LOG_INFO("This adapter doesn't support configurable speed"); + return ERROR_OK; + } + if (CLOCK_MODE_UNSELECTED == clock_mode) { LOG_ERROR("An adapter speed is not selected in the init script." " Insert a call to adapter_khz or jtag_rclk to proceed."); |