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/drivers/opendous.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/drivers/opendous.c')
-rw-r--r-- | src/jtag/drivers/opendous.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/jtag/drivers/opendous.c b/src/jtag/drivers/opendous.c index 3a6cf5c6..b13cbe05 100644 --- a/src/jtag/drivers/opendous.c +++ b/src/jtag/drivers/opendous.c @@ -86,9 +86,6 @@ static uint8_t usb_out_buffer[OPENDOUS_OUT_BUFFER_SIZE]; /* External interface functions */ static int opendous_execute_queue(void); -static int opendous_speed(int speed); -static int opendous_speed_div(int speed, int *khz); -static int opendous_khz(int khz, int *jtag_speed); static int opendous_init(void); static int opendous_quit(void); @@ -194,9 +191,6 @@ struct jtag_interface opendous_interface = { .name = "opendous", .commands = opendous_command_handlers, .execute_queue = opendous_execute_queue, - .speed = opendous_speed, - .speed_div = opendous_speed_div, - .khz = opendous_khz, .init = opendous_init, .quit = opendous_quit, }; @@ -276,33 +270,6 @@ static int opendous_execute_queue(void) return opendous_tap_execute(); } -/* Sets speed in kHz. */ -static int opendous_speed(int speed) -{ - if (speed <= OPENDOUS_MAX_SPEED) { - /* one day... */ - return ERROR_OK; - } else - LOG_INFO("Requested speed %dkHz exceeds maximum of %dkHz, ignored", speed, OPENDOUS_MAX_SPEED); - - return ERROR_OK; -} - -static int opendous_speed_div(int speed, int *khz) -{ - *khz = speed; - - return ERROR_OK; -} - -static int opendous_khz(int khz, int *jtag_speed) -{ - *jtag_speed = khz; - /* TODO: convert this into delay value for opendous */ - - return ERROR_OK; -} - static int opendous_init(void) { int check_cnt; |