]> git.sur5r.net Git - openocd/commitdiff
jtag: retire one instance of jtag_get_end_state() usage
authorØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 18 Mar 2010 11:07:41 +0000 (12:07 +0100)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Thu, 18 Mar 2010 11:08:11 +0000 (12:08 +0100)
Less global variables....

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
13 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/arm966e.c
src/target/arm9tdmi.c
src/target/arm_jtag.c
src/target/arm_jtag.h
src/target/embeddedice.c
src/target/etm.c
src/target/feroceon.c

index 091b77ab4c57dbea85d6c0dbb782701a69ead6e5..41443ff2fe5b4d898a6309f95369bc7e24d909bc 100644 (file)
@@ -88,7 +88,7 @@ int adi_jtag_dp_scan(struct adiv5_dap *swjdp,
        uint8_t out_addr_buf;
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_set_instr(jtag_info, instr, NULL);
+       arm_jtag_set_instr(jtag_info, instr, NULL, TAP_IDLE);
 
        /* Scan out a read or write operation using some DP or AP register.
         * For APACC access with any sticky error flag set, this is discarded.
@@ -330,10 +330,9 @@ static int jtag_idcode_q_read(struct adiv5_dap *dap,
        int retval;
        struct scan_field fields[1];
 
-       jtag_set_end_state(TAP_IDLE);
-
        /* This is a standard JTAG operation -- no DAP tweakage */
-       retval = arm_jtag_set_instr(jtag_info, JTAG_DP_IDCODE, NULL);
+       jtag_set_end_state(TAP_IDLE);
+       retval = arm_jtag_set_instr(jtag_info, JTAG_DP_IDCODE, NULL, TAP_IDLE);
        if (retval != ERROR_OK)
                return retval;
 
index 71d4a0172bd1fb5513767b9dd4f7f4be6206c5b0..6e72c7a704b36722e45bd9a402c83ede140323b7 100644 (file)
@@ -55,11 +55,11 @@ static int arm720t_scan_cp15(struct target *target,
        buf_set_u32(out_buf, 0, 32, flip_u32(out, 32));
 
        jtag_set_end_state(TAP_DRPAUSE);
-       if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0xf, TAP_DRPAUSE)) != ERROR_OK)
        {
                return retval;
        }
-       if ((retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL)) != ERROR_OK)
+       if ((retval = arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE)) != ERROR_OK)
        {
                return retval;
        }
index c6a08cf1bfb87c1064cf6d2c19d08ff169e00487..85c68163affe3998c9f4e29aeac18573db3f4ef2 100644 (file)
@@ -690,9 +690,9 @@ int arm7_9_execute_sys_speed(struct target *target)
        jtag_set_end_state(TAP_IDLE);
        if (arm7_9->need_bypass_before_restart) {
                arm7_9->need_bypass_before_restart = 0;
-               arm_jtag_set_instr(jtag_info, 0xf, NULL);
+               arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
        }
-       arm_jtag_set_instr(jtag_info, 0x4, NULL);
+       arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE);
 
        long long then = timeval_ms();
        int timeout;
@@ -743,9 +743,9 @@ int arm7_9_execute_fast_sys_speed(struct target *target)
        jtag_set_end_state(TAP_IDLE);
        if (arm7_9->need_bypass_before_restart) {
                arm7_9->need_bypass_before_restart = 0;
-               arm_jtag_set_instr(jtag_info, 0xf, NULL);
+               arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
        }
-       arm_jtag_set_instr(jtag_info, 0x4, NULL);
+       arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE);
 
        if (!set)
        {
@@ -1746,9 +1746,9 @@ int arm7_9_restart_core(struct target *target)
        jtag_set_end_state(TAP_IDLE);
        if (arm7_9->need_bypass_before_restart) {
                arm7_9->need_bypass_before_restart = 0;
-               arm_jtag_set_instr(jtag_info, 0xf, NULL);
+               arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
        }
-       arm_jtag_set_instr(jtag_info, 0x4, NULL);
+       arm_jtag_set_instr(jtag_info, 0x4, NULL, TAP_IDLE);
 
        jtag_add_runtest(1, TAP_IDLE);
        return jtag_execute_queue();
index 2d6d68f61a9340c3026bbba655e46971db3cb96b..25151ff4b9a94d0f8cd72a7bf785c29a484e716c 100644 (file)
@@ -66,11 +66,11 @@ static int arm7tdmi_examine_debug_reason(struct target *target)
                fields[1].out_value = NULL;
                fields[1].in_value = databus;
 
-               if ((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
+               if ((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1, TAP_DRPAUSE)) != ERROR_OK)
                {
                        return retval;
                }
-               arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL);
+               arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE);
 
                jtag_add_dr_scan(arm7_9->jtag_info.tap, 2, fields, TAP_DRPAUSE);
                if ((retval = jtag_execute_queue()) != ERROR_OK)
@@ -120,8 +120,8 @@ static __inline int arm7tdmi_clock_out(struct arm_jtag *jtag_info,
                uint32_t out, uint32_t *deprecated, int breakpoint)
 {
        jtag_set_end_state(TAP_DRPAUSE);
-       arm_jtag_scann(jtag_info, 0x1);
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
 
        return arm7tdmi_clock_out_inner(jtag_info, out, breakpoint);
 }
@@ -133,11 +133,11 @@ static int arm7tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in)
        struct scan_field fields[2];
 
        jtag_set_end_state(TAP_DRPAUSE);
-       if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE)) != ERROR_OK)
        {
                return retval;
        }
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
 
        fields[0].num_bits = 1;
        fields[0].out_value = NULL;
@@ -218,11 +218,11 @@ static int arm7tdmi_clock_data_in_endianness(struct arm_jtag *jtag_info,
        struct scan_field fields[2];
 
        jtag_set_end_state(TAP_DRPAUSE);
-       if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE)) != ERROR_OK)
        {
                return retval;
        }
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
 
        fields[0].num_bits = 1;
        fields[0].out_value = NULL;
index 68d3997c9a66dc1b6b972a462327331df10b7497..2e7c72db1a90740db69d480e01cce13e8b6534c5 100644 (file)
@@ -92,8 +92,8 @@ static int arm920t_read_cp15_physical(struct target *target,
        jtag_info = &arm920t->arm7_9_common.jtag_info;
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(jtag_info, 0xf);
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 1;
        fields[0].out_value = &access_type_buf;
@@ -143,8 +143,8 @@ static int arm920t_write_cp15_physical(struct target *target,
        buf_set_u32(value_buf, 0, 32, value);
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(jtag_info, 0xf);
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 1;
        fields[0].out_value = &access_type_buf;
@@ -193,8 +193,8 @@ static int arm920t_execute_cp15(struct target *target, uint32_t cp15_opcode,
        jtag_info = &arm920t->arm7_9_common.jtag_info;
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(jtag_info, 0xf);
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_scann(jtag_info, 0xf, TAP_IDLE);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        buf_set_u32(cp15_opcode_buf, 0, 32, cp15_opcode);
 
index ea951e55650ce05630ed4dae6980cb1ee5117678..c45d98407ab3aab1e960034c083131a897039d4e 100644 (file)
@@ -64,11 +64,11 @@ static int arm926ejs_cp15_read(struct target *target, uint32_t op1, uint32_t op2
        buf_set_u32(address_buf, 0, 14, address);
 
        jtag_set_end_state(TAP_IDLE);
-       if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE)) != ERROR_OK)
        {
                return retval;
        }
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
@@ -121,7 +121,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
 
-       arm_jtag_set_instr(jtag_info, 0xc, NULL);
+       arm_jtag_set_instr(jtag_info, 0xc, NULL, TAP_IDLE);
 
        return ERROR_OK;
 }
@@ -153,11 +153,11 @@ static int arm926ejs_cp15_write(struct target *target, uint32_t op1, uint32_t op
        buf_set_u32(value_buf, 0, 32, value);
 
        jtag_set_end_state(TAP_IDLE);
-       if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE)) != ERROR_OK)
        {
                return retval;
        }
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = value_buf;
@@ -207,7 +207,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
 
-       arm_jtag_set_instr(jtag_info, 0xf, NULL);
+       arm_jtag_set_instr(jtag_info, 0xf, NULL, TAP_IDLE);
 
        return ERROR_OK;
 }
index 67678c14defa5151768b82316071f69f7f92f745..c1e80582bf21488608f6bae8562c0491f8850079 100644 (file)
@@ -85,11 +85,11 @@ static int arm966e_read_cp15(struct target *target, int reg_addr, uint32_t *valu
        uint8_t nr_w_buf = 0;
 
        jtag_set_end_state(TAP_IDLE);
-       if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE)) != ERROR_OK)
        {
                return retval;
        }
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        /* REVISIT: table 7-2 shows that bits 31-31 need to be
@@ -140,11 +140,11 @@ int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value)
        buf_set_u32(value_buf, 0, 32, value);
 
        jtag_set_end_state(TAP_IDLE);
-       if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0xf, TAP_IDLE)) != ERROR_OK)
        {
                return retval;
        }
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = value_buf;
index f0911880bb0c486591763dfbf7020e5021b8de69..b4b6f04a5621d31f87c5e0954224c6f99b6aaf0f 100644 (file)
@@ -101,11 +101,11 @@ int arm9tdmi_examine_debug_reason(struct target *target)
                fields[2].out_value = NULL;
                fields[2].in_value = instructionbus;
 
-               if ((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
+               if ((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1, TAP_DRPAUSE)) != ERROR_OK)
                {
                        return retval;
                }
-               arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL);
+               arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL, TAP_DRPAUSE);
 
                jtag_add_dr_scan(arm7_9->jtag_info.tap, 3, fields, TAP_DRPAUSE);
                if ((retval = jtag_execute_queue()) != ERROR_OK)
@@ -155,12 +155,12 @@ int arm9tdmi_clock_out(struct arm_jtag *jtag_info, uint32_t instr,
                buf_set_u32(&sysspeed_buf, 2, 1, 1);
 
        jtag_set_end_state(TAP_DRPAUSE);
-       if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE)) != ERROR_OK)
        {
                return retval;
        }
 
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = out_buf;
@@ -214,12 +214,12 @@ int arm9tdmi_clock_data_in(struct arm_jtag *jtag_info, uint32_t *in)
        struct scan_field fields[3];
 
        jtag_set_end_state(TAP_DRPAUSE);
-       if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE)) != ERROR_OK)
        {
                return retval;
        }
 
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
@@ -281,12 +281,12 @@ int arm9tdmi_clock_data_in_endianness(struct arm_jtag *jtag_info,
        struct scan_field fields[3];
 
        jtag_set_end_state(TAP_DRPAUSE);
-       if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
+       if ((retval = arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE)) != ERROR_OK)
        {
                return retval;
        }
 
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
index 5ed104cf11d0273a09b9c98d981e617a6b567078..f8b5f4f4f1fd652494a5575e839f045247d1e570 100644 (file)
@@ -31,7 +31,7 @@
 #define _ARM_JTAG_SCAN_N_CHECK_
 #endif
 
-int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, uint32_t new_instr,  void *no_verify_capture)
+int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, uint32_t new_instr,  void *no_verify_capture, tap_state_t end_state)
 {
        struct jtag_tap *tap;
        tap = jtag_info->tap;
@@ -45,19 +45,19 @@ int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, uint32_t new_instr,  vo
 
        if (no_verify_capture == NULL)
        {
-               jtag_add_ir_scan(tap, &field, jtag_get_end_state());
+               jtag_add_ir_scan(tap, &field, end_state);
        } else
        {
                /* FIX!!!! this is a kludge!!! arm926ejs.c should reimplement this arm_jtag_set_instr to
                 * have special verification code.
                 */
-               jtag_add_ir_scan_noverify(tap, &field, jtag_get_end_state());
+               jtag_add_ir_scan_noverify(tap, &field, end_state);
        }
 
        return ERROR_OK;
 }
 
-int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain)
+int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain, tap_state_t end_state)
 {
        int retval = ERROR_OK;
        uint32_t values[1];
@@ -66,7 +66,7 @@ int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain)
        values[0]=new_scan_chain;
        num_bits[0]=jtag_info->scann_size;
 
-       if ((retval = arm_jtag_set_instr(jtag_info, jtag_info->scann_instr, NULL)) != ERROR_OK)
+       if ((retval = arm_jtag_set_instr(jtag_info, jtag_info->scann_instr, NULL, end_state)) != ERROR_OK)
        {
                return retval;
        }
@@ -75,7 +75,7 @@ int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain)
                        1,
                        num_bits,
                        values,
-                       jtag_get_end_state());
+                       end_state);
 
        jtag_info->cur_scan_chain = new_scan_chain;
 
index cf230b43361b4c121f665aed7374188d21a23bf1..37c228f8e12bad3947604005bcbedaf7d96589a5 100644 (file)
@@ -2,7 +2,7 @@
  *   Copyright (C) 2005 by Dominic Rath                                    *
  *   Dominic.Rath@gmx.de                                                   *
  *                                                                         *
- *   Copyright (C) 2007,2008 Øyvind Harboe                                 *
+ *   Copyright (C) 2007-2010 Øyvind Harboe                                 *
  *   oyvind.harboe@zylin.com                                               *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -36,9 +36,11 @@ struct arm_jtag
        uint32_t intest_instr;
 };
 
-int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, uint32_t new_instr,  void *no_verify_capture);
+int arm_jtag_set_instr_inner(struct arm_jtag *jtag_info, 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,
-               uint32_t new_instr, void *no_verify_capture)
+               uint32_t new_instr, void *no_verify_capture, tap_state_t end_state)
 {
        /* inline most common code path */
        struct jtag_tap *tap;
@@ -48,7 +50,7 @@ static inline int arm_jtag_set_instr(struct arm_jtag *jtag_info,
 
        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);
+               return arm_jtag_set_instr_inner(jtag_info, new_instr, no_verify_capture, end_state);
        }
 
        return ERROR_OK;
@@ -56,14 +58,14 @@ static inline int arm_jtag_set_instr(struct arm_jtag *jtag_info,
 }
 
 
-int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain);
-static inline int arm_jtag_scann(struct arm_jtag *jtag_info, uint32_t new_scan_chain)
+int arm_jtag_scann_inner(struct arm_jtag *jtag_info, uint32_t new_scan_chain, tap_state_t end_state);
+static inline int arm_jtag_scann(struct arm_jtag *jtag_info, uint32_t new_scan_chain, tap_state_t end_state)
 {
        /* inline most common code path */
        int retval = ERROR_OK;
        if (jtag_info->cur_scan_chain != new_scan_chain)
        {
-               return arm_jtag_scann_inner(jtag_info, new_scan_chain);
+               return arm_jtag_scann_inner(jtag_info, new_scan_chain, end_state);
        }
 
        return retval;
index fe266d62814696324bc6c7e64402aab3dd7953c3..9272f667c8dd99a5019b25f00d8924fe8b4daf1b 100644 (file)
@@ -344,9 +344,9 @@ int embeddedice_read_reg_w_check(struct reg *reg,
        uint8_t field2_out[1];
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(ice_reg->jtag_info, 0x2);
+       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);
+       arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
 
        /* bits 31:0 -- data (ignored here) */
        fields[0].num_bits = 32;
@@ -406,8 +406,8 @@ int embeddedice_receive(struct arm_jtag *jtag_info, uint32_t *data, uint32_t siz
        uint8_t field2_out[1];
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(jtag_info, 0x2);
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
@@ -491,9 +491,9 @@ void embeddedice_write_reg(struct reg *reg, uint32_t value)
        LOG_DEBUG("%i: 0x%8.8" PRIx32 "", ice_reg->addr, value);
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(ice_reg->jtag_info, 0x2);
+       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);
+       arm_jtag_set_instr(ice_reg->jtag_info, 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);
@@ -524,8 +524,8 @@ int embeddedice_send(struct arm_jtag *jtag_info, uint32_t *data, uint32_t size)
        uint8_t field2_out[1];
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(jtag_info, 0x2);
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = field0_out;
@@ -577,8 +577,8 @@ int embeddedice_handshake(struct arm_jtag *jtag_info, int hsbit, uint32_t timeou
                return ERROR_INVALID_ARGUMENTS;
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(jtag_info, 0x2);
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_scann(jtag_info, 0x2, TAP_IDLE);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
index a1c77b0ff3392e77de20a5917eb09dcb48793c64..3c25f4e8373ff33808a98ffa0b9733dc75cbc089 100644 (file)
@@ -505,8 +505,8 @@ static int etm_read_reg_w_check(struct reg *reg,
        LOG_DEBUG("%s (%u)", r->name, reg_addr);
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(etm_reg->jtag_info, 0x6);
-       arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL);
+       arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
+       arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = reg->value;
@@ -588,8 +588,8 @@ static int etm_write_reg(struct reg *reg, uint32_t value)
        LOG_DEBUG("%s (%u): 0x%8.8" PRIx32 "", r->name, reg_addr, value);
 
        jtag_set_end_state(TAP_IDLE);
-       arm_jtag_scann(etm_reg->jtag_info, 0x6);
-       arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL);
+       arm_jtag_scann(etm_reg->jtag_info, 0x6, TAP_IDLE);
+       arm_jtag_set_instr(etm_reg->jtag_info, etm_reg->jtag_info->intest_instr, NULL, TAP_IDLE);
 
        fields[0].num_bits = 32;
        uint8_t tmp1[4];
index 22ddb5573e9d77fed67dac5a1815bff520339500..405c50c07faa6c70b0256d4f84c65b2219f93fcc 100644 (file)
@@ -85,9 +85,9 @@ int feroceon_dummy_clock_out(struct arm_jtag *jtag_info, uint32_t instr)
        buf_set_u32(instr_buf, 0, 32, flip_u32(instr, 32));
 
        jtag_set_end_state(TAP_DRPAUSE);
-       arm_jtag_scann(jtag_info, 0x1);
+       arm_jtag_scann(jtag_info, 0x1, TAP_DRPAUSE);
 
-       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
+       arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL, TAP_DRPAUSE);
 
        fields[0].num_bits = 32;
        fields[0].out_value = out_buf;