]> git.gag.com Git - fw/openocd/commitdiff
jtag: fix command "adapter [de]assert" with dap direct
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 6 Mar 2020 09:30:25 +0000 (10:30 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Tue, 24 Mar 2020 17:27:39 +0000 (17:27 +0000)
The commit fafe6dfc9cd8 ("adapter: add command "adapter [de]assert
srst|trst [[de]assert srst|trst]"") was proposed in gerrit well
before commit a61ec3c1d73d ("adi_v5_dapdirect: add support for
adapter drivers that provide DAP API") get merged, so it didn't
include a complete support for dap direct.
The merge upstream of the two commits lacks the support by command
"adapter [de]assert" for dap direct

Let command command "adapter [de]assert" handle dap direct.

Change-Id: I1a69f8ee877c8fd57598ed4ad9d71da61d15457c
Fixes: commit fafe6dfc9cd8 ("adapter: add command "adapter [de]assert srst|trst [[de]assert srst|trst]"")
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5515
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/core.c

index c5011e5226850e0061de1d70a01cdde261d54c60..0015233657bed89396c6dbfa5ad9e7fe95280e77 100644 (file)
@@ -2021,7 +2021,8 @@ int adapter_resets(int trst, int srst)
                /* adapters without trst signal will eventually use tlr sequence */
                jtag_add_reset(trst, srst);
                return ERROR_OK;
-       } else if (transport_is_swd() || transport_is_hla()) {
+       } else if (transport_is_swd() || transport_is_hla() ||
+                          transport_is_dapdirect_swd() || transport_is_dapdirect_jtag()) {
                if (trst == TRST_ASSERT) {
                        LOG_ERROR("transport %s has no trst signal",
                                get_current_transport()->name);