]> git.sur5r.net Git - openocd/commitdiff
rename jtag_nsrst_assert_width as adapter_nsrst_assert_width
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 15 Mar 2010 15:42:26 +0000 (08:42 -0700)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 15 Mar 2010 15:42:26 +0000 (08:42 -0700)
Globally rename "jtag_nsrst_assert_width" as "adapter_nsrst_assert_width",
and move it out of the "jtag" command group ...  it needs to be used with
non-JTAG transports

Includes a migration aid (in jtag/startup.tcl) so that old user scripts
won't break.  That aid should Sunset in about a year.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
NEWS
doc/openocd.texi
src/jtag/core.c
src/jtag/startup.tcl
src/jtag/tcl.c
tcl/board/telo.cfg
tcl/target/telo.cfg

diff --git a/NEWS b/NEWS
index 924ee372abf669b77319a5d24dfe2f2c21e61920..cc2560b6e6c052ede599780fbd12453d712d6f20 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ JTAG Layer:
           will not be around forever.
                jtag_khz        ... is now adapter_khz
                jtag_nsrst_delay ... is now adapter_nsrst_delay
+               jtag_nsrst_assert_width ... is now adapter_nsrst_assert_width
 
 Boundary Scan:
 
index 9d1532b1c900a5837c0554c93f2fbb431f409ce7..e1bb2b770892b7ae2e4ddebcb51cb5b1a98d3ee1 100644 (file)
@@ -2643,7 +2643,7 @@ needing to cope with both architecture and board specific constraints.
 
 @section Commands for Handling Resets
 
-@deffn {Command} jtag_nsrst_assert_width milliseconds
+@deffn {Command} adapter_nsrst_assert_width milliseconds
 Minimum amount of time (in milliseconds) OpenOCD should wait
 after asserting nSRST (active-low system reset) before
 allowing it to be deasserted.
index bb11ff159781092af94e9609b4a1bb4a3594da39..9792280b20d78e3e1f086f94c237bdc401a7c01d 100644 (file)
@@ -95,7 +95,7 @@ static int jtag_verify = 1;
 /* how long the OpenOCD should wait before attempting JTAG communication after reset lines deasserted (in ms) */
 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 adapter_nsrst_assert_width = 0; /* width of assertion */
 static int jtag_ntrst_assert_width = 0; /* width of assertion */
 
 /**
@@ -699,8 +699,8 @@ void jtag_add_reset(int req_tlr_or_trst, int req_srst)
                if (jtag_srst)
                {
                        LOG_DEBUG("SRST line asserted");
-                       if (jtag_nsrst_assert_width)
-                               jtag_add_sleep(jtag_nsrst_assert_width * 1000);
+                       if (adapter_nsrst_assert_width)
+                               jtag_add_sleep(adapter_nsrst_assert_width * 1000);
                }
                else {
                        LOG_DEBUG("SRST line released");
@@ -1714,11 +1714,11 @@ unsigned jtag_get_ntrst_delay(void)
 
 void jtag_set_nsrst_assert_width(unsigned delay)
 {
-       jtag_nsrst_assert_width = delay;
+       adapter_nsrst_assert_width = delay;
 }
 unsigned jtag_get_nsrst_assert_width(void)
 {
-       return jtag_nsrst_assert_width;
+       return adapter_nsrst_assert_width;
 }
 void jtag_set_ntrst_assert_width(unsigned delay)
 {
index 42fbe4f6975ea8911ef7c01408d16a84bb54294e..3a36886dd88ce1345c22d2f55f89495c5b2e877b 100644 (file)
@@ -84,4 +84,6 @@ proc srst_asserted {} {
 #
 proc jtag_khz args { eval adapter_khz $args }
 proc jtag_nsrst_delay args { eval adapter_nsrst_delay $args }
+proc jtag_nsrst_assert_width args { eval adapter_nsrst_assert_width $args }
+
 # END MIGRATION AIDS
index d587922bb259e8eb3ba96a21b3dfcad9563ebc1f..686eb3e89045261e0fb5165a8ceaa5385c0581e2 100644 (file)
@@ -1321,7 +1321,7 @@ COMMAND_HANDLER(handle_jtag_ntrst_delay_command)
        return ERROR_OK;
 }
 
-COMMAND_HANDLER(handle_jtag_nsrst_assert_width_command)
+COMMAND_HANDLER(handle_adapter_nsrst_assert_width_command)
 {
        if (CMD_ARGC > 1)
                return ERROR_COMMAND_SYNTAX_ERROR;
@@ -1332,7 +1332,7 @@ COMMAND_HANDLER(handle_jtag_nsrst_assert_width_command)
 
                jtag_set_nsrst_assert_width(delay);
        }
-       command_print(CMD_CTX, "jtag_nsrst_assert_width: %u", jtag_get_nsrst_assert_width());
+       command_print(CMD_CTX, "adapter_nsrst_assert_width: %u", jtag_get_nsrst_assert_width());
        return ERROR_OK;
 }
 
@@ -1618,11 +1618,18 @@ static const struct command_registration interface_command_handlers[] = {
                        "With or without argument, display current setting.",
                .usage = "[khz]",
        },
+       {
+               .name = "adapter_nsrst_assert_width",
+               .handler = handle_adapter_nsrst_assert_width_command,
+               .mode = COMMAND_ANY,
+               .help = "delay after asserting SRST in ms",
+               .usage = "[milliseconds]",
+       },
        {
                .name = "adapter_nsrst_delay",
                .handler = handle_adapter_nsrst_delay_command,
                .mode = COMMAND_ANY,
-               .help = "delay after deasserting srst in ms",
+               .help = "delay after deasserting SRST in ms",
                .usage = "[milliseconds]",
        },
        {
@@ -1680,13 +1687,6 @@ static const struct command_registration jtag_command_handlers[] = {
                .help = "delay after deasserting trst in ms",
                .usage = "[milliseconds]",
        },
-       {
-               .name = "jtag_nsrst_assert_width",
-               .handler = handle_jtag_nsrst_assert_width_command,
-               .mode = COMMAND_ANY,
-               .help = "delay after asserting srst in ms",
-               .usage = "[milliseconds]",
-       },
        {
                .name = "jtag_ntrst_assert_width",
                .handler = handle_jtag_ntrst_assert_width_command,
index 80040b1409cd847fdf54d809459d1665bf5f21aa..a60cb02db8da02304a327735ad754b41bb0bbc45 100644 (file)
@@ -13,7 +13,7 @@ source [find target/c100helper.tcl]
 # use libftdi.so library instead with this script
 # make the reset asserted to
 # allow RC circuit to discharge for: [ms]
-jtag_nsrst_assert_width 100
+adapter_nsrst_assert_width 100
 jtag_ntrst_assert_width 100
 # don't talk to JTAG after reset for: [ms]
 adapter_nsrst_delay 100
index 40674b9d45b06a1ab02936a3fb35e9608a822689..aa9ff2254728ba75b037586bb4e3f9523d9f187b 100644 (file)
@@ -13,7 +13,7 @@ source [find target/c100helper.tcl]
 # use libftdi.so library instead with this script
 # make the reset asserted to
 # allow RC circuit to discharge for: [ms]
-jtag_nsrst_assert_width 100
+adapter_nsrst_assert_width 100
 jtag_ntrst_assert_width 100
 # don't talk to JTAG after reset for: [ms]
 adapter_nsrst_delay 100