From: Zach W. <zw...@us...> - 2009-11-15 18:22:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via f30136603e4cc8b2db0112a32f26959d5201e58c (commit) via 673196887325188af843a9cc153c3cde86b25321 (commit) from a502676df7e6e99c29f207003ec02a128012d325 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f30136603e4cc8b2db0112a32f26959d5201e58c Author: Zachary T Welch <zw...@su...> Date: Sun Nov 15 09:12:44 2009 -0800 arm-jtag-ew,jlink: switch to COMMAND_HANDLER These drivers were overlooked during the recent upgrade. Convert them, moving their registration routines to eliminate their declarations. diff --git a/src/jtag/arm-jtag-ew.c b/src/jtag/arm-jtag-ew.c index 0568d1c..18b353a 100644 --- a/src/jtag/arm-jtag-ew.c +++ b/src/jtag/arm-jtag-ew.c @@ -63,9 +63,6 @@ static int armjtagew_register_commands(struct command_context *cmd_ctx); static int armjtagew_init(void); static int armjtagew_quit(void); -/* CLI command handler functions */ -static int armjtagew_handle_armjtagew_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc); - /* Queue command functions */ static void armjtagew_end_state(tap_state_t state); static void armjtagew_state_move(void); @@ -240,13 +237,6 @@ static int armjtagew_khz(int khz, int *jtag_speed) return ERROR_OK; } -static int armjtagew_register_commands(struct command_context *cmd_ctx) -{ - register_command(cmd_ctx, NULL, "armjtagew_info", armjtagew_handle_armjtagew_info_command, COMMAND_EXEC, - "query armjtagew info"); - return ERROR_OK; -} - static int armjtagew_init(void) { int check_cnt; @@ -520,7 +510,7 @@ static int armjtagew_get_version_info(void) return ERROR_OK; } -static int armjtagew_handle_armjtagew_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc) +COMMAND_HANDLER(armjtagew_handle_armjtagew_info_command) { if (armjtagew_get_version_info() == ERROR_OK) { @@ -531,6 +521,14 @@ static int armjtagew_handle_armjtagew_info_command(struct command_context *cmd_c return ERROR_OK; } +static int armjtagew_register_commands(struct command_context *cmd_ctx) +{ + register_command(cmd_ctx, NULL, "armjtagew_info", + &armjtagew_handle_armjtagew_info_command, COMMAND_EXEC, + "query armjtagew info"); + return ERROR_OK; +} + /***************************************************************************/ /* ARM-JTAG-EW tap functions */ diff --git a/src/jtag/jlink.c b/src/jtag/jlink.c index 27d400d..2422135 100644 --- a/src/jtag/jlink.c +++ b/src/jtag/jlink.c @@ -91,10 +91,6 @@ static int jlink_register_commands(struct command_context *cmd_ctx); static int jlink_init(void); static int jlink_quit(void); -/* CLI command handler functions */ -static int jlink_handle_jlink_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc); -static int jlink_handle_jlink_hw_jtag_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc); - /* Queue command functions */ static void jlink_end_state(tap_state_t state); static void jlink_state_move(void); @@ -290,18 +286,6 @@ static int jlink_khz(int khz, int *jtag_speed) return ERROR_OK; } -static int jlink_register_commands(struct command_context *cmd_ctx) -{ - - register_command(cmd_ctx, NULL, "jlink_info", - &jlink_handle_jlink_info_command, COMMAND_EXEC, - "query jlink info"); - register_command(cmd_ctx, NULL, "jlink_hw_jtag", - &jlink_handle_jlink_hw_jtag_command, COMMAND_EXEC, - "set/get jlink hw jtag command version [2 | 3]"); - return ERROR_OK; -} - static int jlink_init(void) { int i; @@ -630,7 +614,7 @@ static int jlink_get_version_info(void) return ERROR_OK; } -static int jlink_handle_jlink_info_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc) +COMMAND_HANDLER(jlink_handle_jlink_info_command) { if (jlink_get_version_info() == ERROR_OK) { @@ -641,7 +625,7 @@ static int jlink_handle_jlink_info_command(struct command_context *cmd_ctx, char return ERROR_OK; } -static int jlink_handle_jlink_hw_jtag_command(struct command_context *cmd_ctx, char *cmd, char **args, int argc) +COMMAND_HANDLER(jlink_handle_jlink_hw_jtag_command) { switch (argc) { case 0: @@ -665,6 +649,18 @@ static int jlink_handle_jlink_hw_jtag_command(struct command_context *cmd_ctx, c return ERROR_OK; } +static int jlink_register_commands(struct command_context *cmd_ctx) +{ + + register_command(cmd_ctx, NULL, "jlink_info", + &jlink_handle_jlink_info_command, COMMAND_EXEC, + "query jlink info"); + register_command(cmd_ctx, NULL, "jlink_hw_jtag", + &jlink_handle_jlink_hw_jtag_command, COMMAND_EXEC, + "set/get jlink hw jtag command version [2 | 3]"); + return ERROR_OK; +} + /***************************************************************************/ /* J-Link tap functions */ commit 673196887325188af843a9cc153c3cde86b25321 Author: Zachary T Welch <zw...@su...> Date: Sun Nov 15 09:11:29 2009 -0800 rlink: fix overzealous sed Fix an instance where my cleanup when awry. diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c index 8aa0342..c88067c 100644 --- a/src/jtag/rlink/rlink.c +++ b/src/jtag/rlink/rlink.c @@ -577,8 +577,8 @@ dtc_run_download( */ struct dtc_reply_queue_entry { - struct dtc_reply_queue_entry_s *next; - jtag_struct command *cmd; /* the command that resulted in this entry */ + struct dtc_reply_queue_entry *next; + struct jtag_command *cmd; /* the command that resulted in this entry */ struct { uint8_t *buffer; /* the scan buffer */ @@ -637,7 +637,7 @@ dtc_queue_enqueue_reply( int size, int offset, int length, - jtag_struct command *cmd + struct jtag_command *cmd ) { struct dtc_reply_queue_entry *rq_entry; @@ -1090,7 +1090,7 @@ void rlink_reset(int trst, int srst) static int rlink_scan( - jtag_struct command *cmd, + struct jtag_command *cmd, enum scan_type type, uint8_t *buffer, int scan_size @@ -1378,7 +1378,7 @@ rlink_scan( static int rlink_execute_queue(void) { - jtag_struct command *cmd = jtag_command_queue; /* currently processed command */ + struct jtag_command *cmd = jtag_command_queue; /* currently processed command */ int scan_size; enum scan_type type; uint8_t *buffer; ----------------------------------------------------------------------- Summary of changes: src/jtag/arm-jtag-ew.c | 20 +++++++++----------- src/jtag/jlink.c | 32 ++++++++++++++------------------ src/jtag/rlink/rlink.c | 10 +++++----- 3 files changed, 28 insertions(+), 34 deletions(-) hooks/post-receive -- Main OpenOCD repository |