]> git.sur5r.net Git - openocd/commitdiff
target/arm: Remove usage of struct arm_jtag in ARMv7 targets
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Fri, 13 Nov 2015 23:30:28 +0000 (00:30 +0100)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Tue, 29 Dec 2015 20:27:01 +0000 (20:27 +0000)
The Cortex-A and Cortex-M keeps an arm_jtag struct around just to be
able to pass a pointer to it to one common JTAG function which anyway
only uses the TAP field.

Refactor the function to take a TAP directly, remove the legacy struct
from cortex instances and store the TAP pointer only in the DAP.

Cortex-M makes a call to arm_jtag_setup_connection() with the struct
but the function does nothing useful for a Cortex-M target so remove
the call.

Change-Id: I3b33709ef55372ef14522ed4337e9f2e817ae3ab
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/3142
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
19 files changed:
src/target/adi_v5_jtag.c
src/target/arm720t.c
src/target/arm7_9_common.c
src/target/arm7tdmi.c
src/target/arm920t.c
src/target/arm926ejs.c
src/target/arm946e.c
src/target/arm966e.c
src/target/arm9tdmi.c
src/target/arm_adi_v5.h
src/target/arm_jtag.c
src/target/arm_jtag.h
src/target/cortex_a.c
src/target/cortex_a.h
src/target/cortex_m.c
src/target/cortex_m.h
src/target/embeddedice.c
src/target/etm.c
src/target/feroceon.c

index 4c0f040788999b8efe073f56e6f7371614c2afba..3ab53994e1b77ba848f903307b834302d56e1860 100644 (file)
@@ -81,12 +81,12 @@ static int adi_jtag_dp_scan(struct adiv5_dap *dap,
                uint8_t instr, uint8_t reg_addr, uint8_t RnW,
                uint8_t *outvalue, uint8_t *invalue, uint8_t *ack)
 {
-       struct arm_jtag *jtag_info = dap->jtag_info;
+       struct jtag_tap *tap = dap->tap;
        struct scan_field fields[2];
        uint8_t out_addr_buf;
        int retval;
 
-       retval = arm_jtag_set_instr(jtag_info, instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(tap, instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -107,7 +107,7 @@ static int adi_jtag_dp_scan(struct adiv5_dap *dap,
        fields[1].out_value = outvalue;
        fields[1].in_value = invalue;
 
-       jtag_add_dr_scan(jtag_info->tap, 2, fields, TAP_IDLE);
+       jtag_add_dr_scan(tap, 2, fields, TAP_IDLE);
 
        /* Add specified number of tck clocks after starting memory bus
         * access, giving the hardware time to complete the access.
index 619c80a130ba36a94aa11cc8fc1f70704e128adb..a97ad118e2a9a5b9ec47d6bd3408efc8f0dc36c7 100644 (file)
@@ -58,7 +58,7 @@ static int arm720t_scan_cp15(struct target *target,
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
 
index 617ee78406224922c3833e54017b8a383c75dbf2..7b40f5057e6bd6c9de0a83985c81b3c4bd56f30e 100644 (file)
@@ -628,11 +628,11 @@ int arm7_9_execute_sys_speed(struct target *target)
        /* set RESTART instruction */
        if (arm7_9->need_bypass_before_restart) {
                arm7_9->need_bypass_before_restart = 0;
-               retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
+               retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE);
                if (retval != ERROR_OK)
                        return retval;
        }
-       retval = arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, 0x4, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -682,11 +682,11 @@ static int arm7_9_execute_fast_sys_speed(struct target *target)
        /* set RESTART instruction */
        if (arm7_9->need_bypass_before_restart) {
                arm7_9->need_bypass_before_restart = 0;
-               retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
+               retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE);
                if (retval != ERROR_OK)
                        return retval;
        }
-       retval = arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, 0x4, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -1639,11 +1639,11 @@ static int arm7_9_restart_core(struct target *target)
        if (arm7_9->need_bypass_before_restart) {
                arm7_9->need_bypass_before_restart = 0;
 
-               retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
+               retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE);
                if (retval != ERROR_OK)
                        return retval;
        }
-       retval = arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, 0x4, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
index 807efad14725b65e1d184892f71fcf462830a727..490ecfc0b1f2448d7eeb70cbef8fa2c15d3cabd9 100644 (file)
@@ -66,7 +66,7 @@ static int arm7tdmi_examine_debug_reason(struct target *target)
                retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1, TAP_DRPAUSE);
                if (retval != ERROR_OK)
                        return retval;
-               retval = arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE);
+               retval = arm_jtag_set_instr(arm7_9->jtag_info.tap, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE);
                if (retval != ERROR_OK)
                        return retval;
 
@@ -126,7 +126,7 @@ static inline int arm7tdmi_clock_out(struct arm_jtag *jtag_info,
        retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -142,7 +142,7 @@ static int arm7tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in)
        retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -187,7 +187,7 @@ static int arm7tdmi_clock_data_in_endianness(struct arm_jtag *jtag_info,
        retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
 
index f6a0f5bf81d511137ae13356e435e4656deb87d2..b1579bca514cbae6724d03644936621db5ecb942 100644 (file)
@@ -96,7 +96,7 @@ static int arm920t_read_cp15_physical(struct target *target,
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -151,7 +151,7 @@ static int arm920t_write_cp15_physical(struct target *target,
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -204,7 +204,7 @@ static int arm920t_execute_cp15(struct target *target, uint32_t cp15_opcode,
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
index 4e77ff2e2eadf990b1324433c809e7a5a8674c2f..d8bf2d04686df6504572506427f7a24886b60e5f 100644 (file)
@@ -67,7 +67,7 @@ static int arm926ejs_cp15_read(struct target *target, uint32_t op1, uint32_t op2
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -117,7 +117,7 @@ static int arm926ejs_cp15_read(struct target *target, uint32_t op1, uint32_t op2
        LOG_DEBUG("addr: 0x%x value: %8.8x", address, *value);
 #endif
 
-       retval = arm_jtag_set_instr(jtag_info, 0xc, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, 0xc, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -153,7 +153,7 @@ static int arm926ejs_cp15_write(struct target *target, uint32_t op1, uint32_t op
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -200,7 +200,7 @@ static int arm926ejs_cp15_write(struct target *target, uint32_t op1, uint32_t op
        LOG_DEBUG("addr: 0x%x value: %8.8x", address, value);
 #endif
 
-       retval = arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, 0xf, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
index fb50d694cca6c0ff8cdb568e3e6c10883d128c86..c21ff95f734815e2b44d7e9dfc8db44542d07f5c 100644 (file)
@@ -139,7 +139,7 @@ static int arm946e_read_cp15(struct target *target, int reg_addr, uint32_t *valu
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -191,7 +191,7 @@ int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value)
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
index 6a96ab18f2d6fab0f4c73e5ea71400be9f23a8e7..a174eab4073b82ac02e03215072027de43ad680e 100644 (file)
@@ -87,7 +87,7 @@ static int arm966e_read_cp15(struct target *target, int reg_addr, uint32_t *valu
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -141,7 +141,7 @@ int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value)
        retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
index ac07534f38f7bbfeaa6ec3b0768ae92373056500..ca000a7fec888de11d95e149b13f27c159c46d7f 100644 (file)
@@ -100,7 +100,7 @@ int arm9tdmi_examine_debug_reason(struct target *target)
                retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1, TAP_DRPAUSE);
                if (retval != ERROR_OK)
                        return retval;
-               retval = arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE);
+               retval = arm_jtag_set_instr(arm7_9->jtag_info.tap, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE);
                if (retval != ERROR_OK)
                        return retval;
 
@@ -154,7 +154,7 @@ int arm9tdmi_clock_out(struct arm_jtag *jtag_info, uint32_t instr,
        if (retval != ERROR_OK)
                return retval;
 
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -206,7 +206,7 @@ int arm9tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in)
        if (retval != ERROR_OK)
                return retval;
 
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -258,7 +258,7 @@ int arm9tdmi_clock_data_in_endianness(struct arm_jtag *jtag_info,
        if (retval != ERROR_OK)
                return retval;
 
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;
 
index e6aabdd2838af709d69f055e5414eeac9e3cc977..7f98d509bfc178079b4b4acaecb9ce7c7139aab9 100644 (file)
@@ -182,7 +182,7 @@ struct adiv5_ap {
 struct adiv5_dap {
        const struct dap_ops *ops;
 
-       struct arm_jtag *jtag_info;
+       struct jtag_tap *tap;
        /* Control config */
        uint32_t dp_ctrl_stat;
 
index 6f70e853a04bf9cedd20f1c0e5c215569e0f33ba..d2b9feeed2c2b716a0062b736ed94163e7a95ec9 100644 (file)
 #define _ARM_JTAG_SCAN_N_CHECK_
 #endif
 
-int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info,
+int arm_jtag_set_instr_inner(struct jtag_tap *tap,
                uint32_t new_instr, void *no_verify_capture, tap_state_t end_state)
 {
-       struct jtag_tap *tap;
-       tap = jtag_info->tap;
        struct scan_field field;
        uint8_t t[4];
 
@@ -64,7 +62,7 @@ int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain, ta
        buf_set_u32(out_value, 0, jtag_info->scann_size, new_scan_chain);
        struct scan_field field = { .num_bits = jtag_info->scann_size, .out_value = out_value, };
 
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->scann_instr, NULL, end_state);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->scann_instr, NULL, end_state);
        if (retval != ERROR_OK)
                return retval;
 
index 13b701fc31ea478a3305436f5634f056b1cd6cb4..dbfec857b894f5392e260f157b779d0c123dc914 100644 (file)
@@ -36,20 +36,16 @@ struct arm_jtag {
        uint32_t intest_instr;
 };
 
-int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, uint32_t new_instr,
+int arm_jtag_set_instr_inner(struct jtag_tap *tap, uint32_t new_instr,
                void *no_verify_capture,
                tap_state_t end_state);
 
-static inline int arm_jtag_set_instr(struct arm_jtag *jtag_info,
+static inline int arm_jtag_set_instr(struct jtag_tap *tap,
                uint32_t new_instr, void *no_verify_capture, tap_state_t end_state)
 {
        /* inline most common code path */
-       struct jtag_tap *tap;
-       tap = jtag_info->tap;
-       assert(tap != NULL);
-
        if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
-               return arm_jtag_set_instr_inner(jtag_info, new_instr, no_verify_capture, end_state);
+               return arm_jtag_set_instr_inner(tap, new_instr, no_verify_capture, end_state);
 
        return ERROR_OK;
 
index 45a877d36783b0b785bc871fc3edd2502bf34dbd..7da57b4980cb09e3377570368b7584a59f1b5a37 100644 (file)
@@ -3127,12 +3127,8 @@ static int cortex_a_init_arch_info(struct target *target,
        if (!tap->dap) {
                tap->dap = dap_init();
 
-               /* prepare JTAG information for the new target */
-               cortex_a->jtag_info.tap = tap;
-               cortex_a->jtag_info.scann_size = 4;
-
                /* Leave (only) generic DAP stuff for debugport_init() */
-               tap->dap->jtag_info = &cortex_a->jtag_info;
+               tap->dap->tap = tap;
        }
 
        tap->dap->ap[dap_ap_get_select(tap->dap)].memaccess_tck = 80;
index e124a9e07ccaadb6998177d4b1f05a91ab8bd823..d33188ffcff98eb8557f696d19c556e90c7f1e2c 100644 (file)
@@ -70,7 +70,6 @@ struct cortex_a_brp {
 
 struct cortex_a_common {
        int common_magic;
-       struct arm_jtag jtag_info;
 
        /* Context information */
        uint32_t cpudbg_dscr;
index f8a513265c93d3c147493fea09c0668e6d2ca103..ec5caa288fe1a67c412970dc9091f8276033b8c9 100644 (file)
@@ -2104,7 +2104,6 @@ static int cortex_m_handle_target_request(void *priv)
 static int cortex_m_init_arch_info(struct target *target,
        struct cortex_m_common *cortex_m, struct jtag_tap *tap)
 {
-       int retval;
        struct armv7m_common *armv7m = &cortex_m->armv7m;
 
        armv7m_init_arch_info(target, armv7m);
@@ -2113,12 +2112,8 @@ static int cortex_m_init_arch_info(struct target *target,
        if (!tap->dap) {
                tap->dap = dap_init();
 
-               /* prepare JTAG information for the new target */
-               cortex_m->jtag_info.tap = tap;
-               cortex_m->jtag_info.scann_size = 4;
-
                /* Leave (only) generic DAP stuff for debugport_init() */
-               tap->dap->jtag_info = &cortex_m->jtag_info;
+               tap->dap->tap = tap;
        }
 
        /* default reset mode is to use srst if fitted
@@ -2142,10 +2137,6 @@ static int cortex_m_init_arch_info(struct target *target,
 
        target_register_timer_callback(cortex_m_handle_target_request, 1, 1, target);
 
-       retval = arm_jtag_setup_connection(&cortex_m->jtag_info);
-       if (retval != ERROR_OK)
-               return retval;
-
        return ERROR_OK;
 }
 
index 94a30f1a69b36d2d61b0a455d2070210a9f5de2d..b09cc49a6cd568a1d56c72b44bc22b0f67f1d22a 100644 (file)
@@ -164,7 +164,6 @@ enum cortex_m_isrmasking_mode {
 
 struct cortex_m_common {
        int common_magic;
-       struct arm_jtag jtag_info;
 
        /* Context information */
        uint32_t dcb_dhcsr;
index 2d32c83a516ab262eff93c7d984df9f22ededdea..4b3a05a833c2ddebe4dd1c0107780ffb19abc331 100644 (file)
@@ -349,7 +349,7 @@ int embeddedice_read_reg_w_check(struct reg *reg,
        if (retval != ERROR_OK)
                return retval;
 
-       retval = arm_jtag_set_instr(ice_reg->jtag_info,
+       retval = arm_jtag_set_instr(ice_reg->jtag_info->tap,
                        ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
@@ -415,7 +415,7 @@ int embeddedice_receive(struct arm_jtag *jtag_info, uint32_t *data, uint32_t siz
        retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -502,7 +502,7 @@ void embeddedice_write_reg(struct reg *reg, uint32_t value)
 
        arm_jtag_scann(ice_reg->jtag_info, 0x2, TAP_IDLE);
 
-       arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
+       arm_jtag_set_instr(ice_reg->jtag_info->tap, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
 
        uint8_t reg_addr = ice_reg->addr & 0x1f;
        embeddedice_write_reg_inner(ice_reg->jtag_info->tap, reg_addr, value);
@@ -536,7 +536,7 @@ int embeddedice_send(struct arm_jtag *jtag_info, uint32_t *data, uint32_t size)
        retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
@@ -593,7 +593,7 @@ int embeddedice_handshake(struct arm_jtag *jtag_info, int hsbit, uint32_t timeou
        retval = arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
index ddeb9226e501ebe5b381fb22fa4462d60c833d6e..0246ae25e4ff93fccf9af716715bd906546138de 100644 (file)
@@ -515,7 +515,7 @@ static int etm_read_reg_w_check(struct reg *reg,
        retval = arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(etm_reg->jtag_info,
+       retval = arm_jtag_set_instr(etm_reg->jtag_info->tap,
                        etm_reg->jtag_info->intest_instr,
                        NULL,
                        TAP_IDLE);
@@ -602,7 +602,7 @@ static int etm_write_reg(struct reg *reg, uint32_t value)
        retval = arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
-       retval = arm_jtag_set_instr(etm_reg->jtag_info,
+       retval = arm_jtag_set_instr(etm_reg->jtag_info->tap,
                        etm_reg->jtag_info->intest_instr,
                        NULL,
                        TAP_IDLE);
index ee0bafd2466eefc77d9c6eef17537f257345e492..9c204f04f615f5bb8eb6a4dbf3156b5e8d12f17f 100644 (file)
@@ -88,7 +88,7 @@ static int feroceon_dummy_clock_out(struct arm_jtag *jtag_info, uint32_t instr)
        if (retval != ERROR_OK)
                return retval;
 
-       retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
+       retval = arm_jtag_set_instr(jtag_info->tap, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
        if (retval != ERROR_OK)
                return retval;