Merge branch 'master' of ssh://dbrownell@openocd.git.sourceforge.net/gitroot/openocd/openocd

This commit is contained in:
David Brownell 2010-03-18 12:11:58 -07:00
commit c09035ea2c
13 changed files with 74 additions and 73 deletions

View 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;

View 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;
}

View 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();

View 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;

View 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);

View 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;
}

View 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;

View 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;

View 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;

View 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;

View 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;

View 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];

View 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;