diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/core.c | 10 | ||||
-rw-r--r-- | src/jtag/startup.tcl | 1 | ||||
-rw-r--r-- | src/jtag/tcl.c | 18 |
3 files changed, 15 insertions, 14 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c index bdf968e9..bb11ff15 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -93,7 +93,7 @@ static bool jtag_verify_capture_ir = true; static int jtag_verify = 1; /* how long the OpenOCD should wait before attempting JTAG communication after reset lines deasserted (in ms) */ -static int jtag_nsrst_delay = 0; /* default to no nSRST delay */ +static int adapter_nsrst_delay = 0; /* default to no nSRST delay */ static int jtag_ntrst_delay = 0; /* default to no nTRST delay */ static int jtag_nsrst_assert_width = 0; /* width of assertion */ static int jtag_ntrst_assert_width = 0; /* width of assertion */ @@ -704,8 +704,8 @@ void jtag_add_reset(int req_tlr_or_trst, int req_srst) } else { LOG_DEBUG("SRST line released"); - if (jtag_nsrst_delay) - jtag_add_sleep(jtag_nsrst_delay * 1000); + if (adapter_nsrst_delay) + jtag_add_sleep(adapter_nsrst_delay * 1000); } } @@ -1696,11 +1696,11 @@ int jtag_get_srst(void) void jtag_set_nsrst_delay(unsigned delay) { - jtag_nsrst_delay = delay; + adapter_nsrst_delay = delay; } unsigned jtag_get_nsrst_delay(void) { - return jtag_nsrst_delay; + return adapter_nsrst_delay; } void jtag_set_ntrst_delay(unsigned delay) { diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index c49c43e1..42fbe4f6 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -83,4 +83,5 @@ proc srst_asserted {} { # FIXME phase these aids out after about April 2011 # proc jtag_khz args { eval adapter_khz $args } +proc jtag_nsrst_delay args { eval adapter_nsrst_delay $args } # END MIGRATION AIDS diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 8faefd1a..d587922b 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -1291,7 +1291,7 @@ next: return ERROR_OK; } -COMMAND_HANDLER(handle_jtag_nsrst_delay_command) +COMMAND_HANDLER(handle_adapter_nsrst_delay_command) { if (CMD_ARGC > 1) return ERROR_COMMAND_SYNTAX_ERROR; @@ -1302,7 +1302,7 @@ COMMAND_HANDLER(handle_jtag_nsrst_delay_command) jtag_set_nsrst_delay(delay); } - command_print(CMD_CTX, "jtag_nsrst_delay: %u", jtag_get_nsrst_delay()); + command_print(CMD_CTX, "adapter_nsrst_delay: %u", jtag_get_nsrst_delay()); return ERROR_OK; } @@ -1619,6 +1619,13 @@ static const struct command_registration interface_command_handlers[] = { .usage = "[khz]", }, { + .name = "adapter_nsrst_delay", + .handler = handle_adapter_nsrst_delay_command, + .mode = COMMAND_ANY, + .help = "delay after deasserting srst in ms", + .usage = "[milliseconds]", + }, + { .name = "interface", .handler = handle_interface_command, .mode = COMMAND_CONFIG, @@ -1667,13 +1674,6 @@ static const struct command_registration jtag_command_handlers[] = { "[srst_push_pull|srst_open_drain]", }, { - .name = "jtag_nsrst_delay", - .handler = handle_jtag_nsrst_delay_command, - .mode = COMMAND_ANY, - .help = "delay after deasserting srst in ms", - .usage = "[milliseconds]", - }, - { .name = "jtag_ntrst_delay", .handler = handle_jtag_ntrst_delay_command, .mode = COMMAND_ANY, |