From b58239e4c03c440ac89b36c9de917224a8439332 Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Sat, 21 Nov 2009 10:20:56 -0800 Subject: jtag: remove useless forward declarations Removes some more useless forward declarations from a few JTAG drivers. Moves interface and bit-bang structure defitions below their callbacks. --- src/jtag/jlink.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'src/jtag/jlink.c') diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c index dbbddb86..ebc9acd2 100644 --- a/src/jtag/jlink.c +++ b/src/jtag/jlink.c @@ -82,15 +82,6 @@ static uint8_t usb_emu_result_buffer[JLINK_EMU_RESULT_BUFFER_SIZE]; /* max speed 12MHz v5.0 jlink */ #define JLINK_MAX_SPEED 12000 -/* External interface functions */ -static int jlink_execute_queue(void); -static int jlink_speed(int speed); -static int jlink_speed_div(int speed, int* khz); -static int jlink_khz(int khz, int *jtag_speed); -static int jlink_register_commands(struct command_context *cmd_ctx); -static int jlink_init(void); -static int jlink_quit(void); - /* Queue command functions */ static void jlink_end_state(tap_state_t state); static void jlink_state_move(void); @@ -134,18 +125,6 @@ static struct jlink* jlink_handle; /***************************************************************************/ /* External interface implementation */ -struct jtag_interface jlink_interface = -{ - .name = "jlink", - .execute_queue = jlink_execute_queue, - .speed = jlink_speed, - .speed_div = jlink_speed_div, - .khz = jlink_khz, - .register_commands = jlink_register_commands, - .init = jlink_init, - .quit = jlink_quit -}; - static void jlink_execute_runtest(struct jtag_command *cmd) { DEBUG_JTAG_IO("runtest %i cycles, end in %i", @@ -661,6 +640,17 @@ static int jlink_register_commands(struct command_context *cmd_ctx) return ERROR_OK; } +struct jtag_interface jlink_interface = { + .name = "jlink", + .execute_queue = &jlink_execute_queue, + .speed = &jlink_speed, + .speed_div = &jlink_speed_div, + .khz = &jlink_khz, + .register_commands = &jlink_register_commands, + .init = &jlink_init, + .quit = &jlink_quit, + }; + /***************************************************************************/ /* J-Link tap functions */ -- cgit v1.2.3-18-g5258