summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-18 05:02:08 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-18 15:51:07 -0800
commitc0d14dc7f19d785702eee5f69de5b1a63902554b (patch)
treee93e58120b0a5829e6cf1f1581f4467bc78c1ce7 /src
parent20218b8de61dea545c7575f36e1b74b9599c9848 (diff)
downloadopenocd_libswd-c0d14dc7f19d785702eee5f69de5b1a63902554b.tar.gz
openocd_libswd-c0d14dc7f19d785702eee5f69de5b1a63902554b.tar.bz2
openocd_libswd-c0d14dc7f19d785702eee5f69de5b1a63902554b.tar.xz
openocd_libswd-c0d14dc7f19d785702eee5f69de5b1a63902554b.zip
remove fast command and jim_global_long
Removing the fast command eliminates the fast_and_dangerous global, which was used only by arm7_9_common as an initializer. The command is not called in the tree; instead, more explicit commands are used. The jim_global_long function was not used anywhere in the tree.
Diffstat (limited to 'src')
-rw-r--r--src/helper/command.c29
-rw-r--r--src/helper/command.h4
-rw-r--r--src/target/arm7_9_common.c4
3 files changed, 2 insertions, 35 deletions
diff --git a/src/helper/command.c b/src/helper/command.c
index b7c44efc..ba689b00 100644
--- a/src/helper/command.c
+++ b/src/helper/command.c
@@ -44,7 +44,6 @@
#include "jim-eventloop.h"
-int fast_and_dangerous = 0;
Jim_Interp *interp = NULL;
static int run_command(struct command_context *context,
@@ -141,7 +140,6 @@ static int script_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
log_add_callback(tcl_output, tclOutput);
- // turn words[0] into CMD_ARGV[-1] with this cast
retval = run_command(context, c, (const char **)words, nwords);
log_remove_callback(tcl_output, tclOutput);
@@ -755,17 +753,6 @@ COMMAND_HANDLER(handle_sleep_command)
return ERROR_OK;
}
-COMMAND_HANDLER(handle_fast_command)
-{
- if (CMD_ARGC != 1)
- return ERROR_COMMAND_SYNTAX_ERROR;
-
- fast_and_dangerous = strcmp("enable", CMD_ARGV[0]) == 0;
-
- return ERROR_OK;
-}
-
-
struct command_context* command_init(const char *startup_tcl)
{
struct command_context* context = malloc(sizeof(struct command_context));
@@ -839,10 +826,6 @@ struct command_context* command_init(const char *startup_tcl)
handle_sleep_command, COMMAND_ANY,
"<n> [busy] - sleep for n milliseconds. "
"\"busy\" means busy wait");
- register_command(context, NULL, "fast",
- handle_fast_command, COMMAND_ANY,
- "fast <enable/disable> - place at beginning of "
- "config files. Sets defaults to fast and dangerous.");
return context;
}
@@ -882,18 +865,6 @@ void register_jim(struct command_context *cmd_ctx, const char *name,
command_helptext_add(cmd_list, help);
}
-/* return global variable long value or 0 upon failure */
-long jim_global_long(const char *variable)
-{
- Jim_Obj *objPtr = Jim_GetGlobalVariableStr(interp, variable, JIM_ERRMSG);
- long t;
- if (Jim_GetLong(interp, objPtr, &t) == JIM_OK)
- {
- return t;
- }
- return 0;
-}
-
#define DEFINE_PARSE_NUM_TYPE(name, type, func, min, max) \
int parse##name(const char *str, type *ul) \
{ \
diff --git a/src/helper/command.h b/src/helper/command.h
index a2e97970..def0935a 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -214,15 +214,11 @@ void process_jim_events(void);
#define ERROR_COMMAND_ARGUMENT_OVERFLOW (-604)
#define ERROR_COMMAND_ARGUMENT_UNDERFLOW (-605)
-extern int fast_and_dangerous;
-
extern Jim_Interp *interp;
void register_jim(struct command_context *context, const char *name,
Jim_CmdProc cmd, const char *help);
-long jim_global_long(const char *variable);
-
int parse_ulong(const char *str, unsigned long *ul);
int parse_ullong(const char *str, unsigned long long *ul);
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index 16c8a925..eb4b0383 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -2929,8 +2929,8 @@ int arm7_9_init_arch_info(struct target *target, struct arm7_9_common *arm7_9)
arm7_9->wp_available_max = 2;
- arm7_9->fast_memory_access = fast_and_dangerous;
- arm7_9->dcc_downloads = fast_and_dangerous;
+ arm7_9->fast_memory_access = false;
+ arm7_9->dcc_downloads = false;
armv4_5->arch_info = arm7_9;
armv4_5->read_core_reg = arm7_9_read_core_reg;