target: Cortex-M use consistent arm dap access
[fw/openocd] / src / target / arm_adi_v5.c
index 1ef7c1a004aa6e202befe704984a27459ca08cda..fd3a92ce3f45c0a3946bff69dfc3241eb16b8e0f 100644 (file)
@@ -69,6 +69,7 @@
 #include "config.h"
 #endif
 
+#include "jtag/interface.h"
 #include "arm.h"
 #include "arm_adi_v5.h"
 #include <helper/time_support.h>
@@ -977,10 +978,7 @@ int dap_syssec_kinetis_mdmap(struct adiv5_dap *dap)
                        /* we need to assert reset */
                        if (jtag_reset_config & RESET_HAS_SRST) {
                                /* default to asserting srst */
-                               if (jtag_reset_config & RESET_SRST_PULLS_TRST)
-                                       jtag_add_reset(1, 1);
-                               else
-                                       jtag_add_reset(0, 1);
+                               adapter_assert_reset();
                        } else {
                                LOG_DEBUG("SRST not configured");
                                dap_ap_select(dap, 0);
@@ -1098,14 +1096,6 @@ int ahbap_debugport_init(struct adiv5_dap *dap)
 
        LOG_DEBUG(" ");
 
-       /* test for initialized low level jtag hardware
-        * this always fails for stlink hardware
-        */
-       if (!dap->jtag_info) {
-               LOG_DEBUG("No low level jtag hardware found");
-               return ERROR_OK;
-       }
-
        /* JTAG-DP or SWJ-DP, in JTAG mode
         * ... for SWD mode this is patched as part
         * of link switchover