field.in_value = &status;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
jtag_execute_queue();
LOG_DEBUG("status: 0x%2.2x", status);
field.in_value = str9xpec_info->options;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
jtag_execute_queue();
status = str9xpec_isc_status(tap);
field.out_value = buffer;
field.in_value = NULL;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
jtag_add_sleep(40000);
/* read blank check result */
field.out_value = buffer;
field.in_value = NULL;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
jtag_execute_queue();
jtag_add_sleep(10);
field.out_value = (buffer + bytes_written);
field.in_value = NULL;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
/* small delay before polling */
jtag_add_sleep(50);
field.out_value = last_dword;
field.in_value = NULL;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
/* small delay before polling */
jtag_add_sleep(50);
field.out_value = NULL;
field.in_value = buffer;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
jtag_execute_queue();
idcode = buf_get_u32(buffer, 0, 32);
field.out_value = str9xpec_info->options;
field.in_value = NULL;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_IDLE));
/* small delay before polling */
jtag_add_sleep(50);
if (trst_with_tlr)
{
LOG_DEBUG("JTAG reset with RESET instead of TRST");
- jtag_add_end_state(TAP_RESET);
+ jtag_set_end_state(TAP_RESET);
jtag_add_tlr();
return;
}
}
}
-tap_state_t jtag_add_end_state(tap_state_t state)
+tap_state_t jtag_set_end_state(tap_state_t state)
{
if ((state == TAP_DRSHIFT)||(state == TAP_IRSHIFT))
{
command_print( cmd_ctx, "Invalid state name: %s\n", args[0] );
return ERROR_COMMAND_SYNTAX_ERROR;
}
- jtag_add_end_state(state);
+ jtag_set_end_state(state);
jtag_execute_queue();
}
command_print(cmd_ctx, "current endstate: %s", tap_state_name(cmd_queue_end_state));
/**
- * Function jtag_add_end_state
+ * Function jtag_set_end_state
*
* Set a global variable to \a state if \a state != TAP_INVALID.
*
* Return the value of the global variable.
*
**/
-extern tap_state_t jtag_add_end_state(tap_state_t state);
+extern tap_state_t jtag_set_end_state(tap_state_t state);
/**
* Function jtag_get_end_state
*
* approperiate
*/
extern int interface_jtag_add_reset(int trst, int srst);
-extern int interface_jtag_add_end_state(tap_state_t endstate);
+extern int interface_jtag_set_end_state(tap_state_t endstate);
extern int interface_jtag_add_sleep(u32 us);
extern int interface_jtag_add_clocks(int num_cycles);
extern int interface_jtag_execute_queue(void);
}
}
-int interface_jtag_add_end_state(tap_state_t state)
+int interface_jtag_set_end_state(tap_state_t state)
{
return ERROR_OK;
}
- jtag_add_ir_scan(1, &field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_ir_scan(1, &field, jtag_set_end_state(TAP_IDLE));
free(field.out_value);
}
virtex2_set_instr(virtex2_info->tap, 0x5); /* CFG_IN */
- jtag_add_dr_scan(1, &scan_field, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(1, &scan_field, jtag_set_end_state(TAP_DRPAUSE));
free(values);
{
scan_field.in_value = (u8 *)words;
- jtag_add_dr_scan(1, &scan_field, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(1, &scan_field, jtag_set_end_state(TAP_DRPAUSE));
jtag_add_callback(virtexflip32, (u8 *)words);
if ((retval = xilinx_read_bit_file(&bit_file, filename)) != ERROR_OK)
return retval;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
virtex2_set_instr(virtex2_info->tap, 0xb); /* JPROG_B */
jtag_execute_queue();
jtag_add_sleep(1000);
field.num_bits = bit_file.length * 8;
field.out_value = bit_file.data;
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
jtag_execute_queue();
jtag_add_tlr();
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */
- jtag_add_runtest(13, jtag_add_end_state(TAP_IDLE));
+ jtag_add_runtest(13, jtag_set_end_state(TAP_IDLE));
virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
virtex2_set_instr(virtex2_info->tap, 0xc); /* JSTART */
- jtag_add_runtest(13, jtag_add_end_state(TAP_IDLE));
+ jtag_add_runtest(13, jtag_set_end_state(TAP_IDLE));
virtex2_set_instr(virtex2_info->tap, 0x3f); /* BYPASS */
jtag_execute_queue();
{
Data = *data;
- arm11_add_dr_scan_vc(asizeof(chain5_fields), chain5_fields, jtag_add_end_state(TAP_IDLE));
+ arm11_add_dr_scan_vc(asizeof(chain5_fields), chain5_fields, jtag_set_end_state(TAP_IDLE));
CHECK_RETVAL(jtag_execute_queue());
if (count)
{
- jtag_add_dr_scan(asizeof(chain5_fields), chain5_fields, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(asizeof(chain5_fields), chain5_fields, jtag_set_end_state(TAP_DRPAUSE));
jtag_add_pathmove(asizeof(arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay),
arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay);
}
else
{
- jtag_add_dr_scan(asizeof(chain5_fields), chain5_fields, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(asizeof(chain5_fields), chain5_fields, jtag_set_end_state(TAP_IDLE));
}
}
buf_set_u32(out_buf, 0, 32, flip_u32(out, 32));
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
if((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
{
return retval;
reg_t *dbg_stat = &arm7_9->eice_cache->reg_list[EICE_DBG_STAT];
/* set RESTART instruction */
- jtag_add_end_state(TAP_IDLE);
+ 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);
reg_t *dbg_stat = &arm7_9->eice_cache->reg_list[EICE_DBG_STAT];
/* set RESTART instruction */
- jtag_add_end_state(TAP_IDLE);
+ 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_t *jtag_info = &arm7_9->jtag_info;
/* set RESTART instruction */
- jtag_add_end_state(TAP_IDLE);
+ 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, 0x4, NULL);
- jtag_add_runtest(1, jtag_add_end_state(TAP_IDLE));
+ jtag_add_runtest(1, jtag_set_end_state(TAP_IDLE));
return jtag_execute_queue();
}
u8 databus[4];
u8 breakpoint;
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
fields[0].tap = arm7_9->jtag_info.tap;
fields[0].num_bits = 1;
}
arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL);
- jtag_add_dr_scan(2, fields, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(2, fields, jtag_set_end_state(TAP_DRPAUSE));
if((retval = jtag_execute_queue()) != ERROR_OK)
{
return retval;
fields[1].in_value = NULL;
fields[1].out_value = databus;
- jtag_add_dr_scan(2, fields, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(2, fields, jtag_set_end_state(TAP_DRPAUSE));
if (breakpoint & 1)
target->debug_reason = DBG_REASON_WATCHPOINT;
/* put an instruction in the ARM7TDMI pipeline or write the data bus, and optionally read data */
static __inline int arm7tdmi_clock_out(arm_jtag_t *jtag_info, u32 out, u32 *deprecated, int breakpoint)
{
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
arm_jtag_scann(jtag_info, 0x1);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
int retval = ERROR_OK;
scan_field_t fields[2];
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
if((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
{
return retval;
int retval = ERROR_OK;
scan_field_t fields[2];
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
if((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
{
return retval;
u8 reg_addr_buf = reg_addr & 0x3f;
u8 nr_w_buf = 0;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0xf);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
buf_set_u32(value_buf, 0, 32, value);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0xf);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
u8 nr_w_buf = 0;
u8 cp15_opcode_buf[4];
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0xf);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
buf_set_u32(address_buf, 0, 14, address);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
{
return retval;
buf_set_u32(address_buf, 0, 14, address);
buf_set_u32(value_buf, 0, 32, value);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
{
return retval;
u8 reg_addr_buf = reg_addr & 0x3f;
u8 nr_w_buf = 0;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
{
return retval;
buf_set_u32(value_buf, 0, 32, value);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
if ((retval = arm_jtag_scann(jtag_info, 0xf)) != ERROR_OK)
{
return retval;
u8 instructionbus[4];
u8 debug_reason;
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
fields[0].tap = arm7_9->jtag_info.tap;
fields[0].num_bits = 32;
}
arm_jtag_set_instr(&arm7_9->jtag_info, arm7_9->jtag_info.intest_instr, NULL);
- jtag_add_dr_scan(3, fields, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_DRPAUSE));
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
return retval;
fields[2].in_value = NULL;
fields[2].out_value = instructionbus;
- jtag_add_dr_scan(3, fields, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_DRPAUSE));
if (debug_reason & 0x4)
if (debug_reason & 0x2)
if (sysspeed)
buf_set_u32(&sysspeed_buf, 2, 1, 1);
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
{
return retval;
int retval = ERROR_OK;;
scan_field_t fields[3];
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
{
return retval;
int retval = ERROR_OK;
scan_field_t fields[3];
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
{
return retval;
scan_field_t fields[2];
u8 out_addr_buf;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_set_instr(jtag_info, instr, NULL);
/* Add specified number of tck clocks before accessing memory bus */
if ((instr == DAP_IR_APACC) && ((reg_addr == AP_REG_DRW)||((reg_addr&0xF0) == AP_REG_BD0) )&& (swjdp->memaccess_tck != 0))
- jtag_add_runtest(swjdp->memaccess_tck, jtag_add_end_state(TAP_IDLE));
+ jtag_add_runtest(swjdp->memaccess_tck, jtag_set_end_state(TAP_IDLE));
fields[0].tap = jtag_info->tap;
fields[0].num_bits = 3;
u8 out_value_buf[4];
u8 out_addr_buf;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_set_instr(jtag_info, instr, NULL);
/* Add specified number of tck clocks before accessing memory bus */
if ((instr == DAP_IR_APACC) && ((reg_addr == AP_REG_DRW)||((reg_addr&0xF0) == AP_REG_BD0) )&& (swjdp->memaccess_tck != 0))
- jtag_add_runtest(swjdp->memaccess_tck, jtag_add_end_state(TAP_IDLE));
+ jtag_add_runtest(swjdp->memaccess_tck, jtag_set_end_state(TAP_IDLE));
fields[0].tap = jtag_info->tap;
fields[0].num_bits = 3;
field[0].num_bits = tap->ir_length;
field[0].out_value = ir_out;
field[0].in_value = ir_in;
- jtag_add_plain_ir_scan(sizeof(field) / sizeof(field[0]), field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_plain_ir_scan(sizeof(field) / sizeof(field[0]), field, jtag_set_end_state(TAP_IDLE));
}
return ERROR_OK;
field[0].num_bits = dr_len;
field[0].out_value = dr_out;
field[0].in_value = dr_in;
- jtag_add_plain_dr_scan(sizeof(field) / sizeof(field[0]), field, jtag_add_end_state(TAP_IDLE));
+ jtag_add_plain_dr_scan(sizeof(field) / sizeof(field[0]), field, jtag_set_end_state(TAP_IDLE));
}
return ERROR_OK;
u8 field1_out[1];
u8 field2_out[1];
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(ice_reg->jtag_info, 0x2);
arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL);
u8 field1_out[1];
u8 field2_out[1];
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0x2);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
LOG_DEBUG("%i: 0x%8.8x", ice_reg->addr, value);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(ice_reg->jtag_info, 0x2);
arm_jtag_set_instr(ice_reg->jtag_info, ice_reg->jtag_info->intest_instr, NULL);
u8 field1_out[1];
u8 field2_out[1];
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0x2);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
else
return ERROR_INVALID_ARGUMENTS;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
arm_jtag_scann(jtag_info, 0x2);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
scan_field_t fields[3];
int i;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
etb_scann(etb, 0x0);
etb_set_instr(etb, 0xc);
LOG_DEBUG("%i", etb_reg->addr);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
etb_scann(etb_reg->etb, 0x0);
etb_set_instr(etb_reg->etb, 0xc);
LOG_DEBUG("%i: 0x%8.8x", etb_reg->addr, value);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
etb_scann(etb_reg->etb, 0x0);
etb_set_instr(etb_reg->etb, 0xc);
LOG_DEBUG("%i", etm_reg->addr);
- jtag_add_end_state(TAP_IDLE);
+ 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);
LOG_DEBUG("%i: 0x%8.8x", etm_reg->addr, value);
- jtag_add_end_state(TAP_IDLE);
+ 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);
buf_set_u32(instr_buf, 0, 32, flip_u32(instr, 32));
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
arm_jtag_scann(jtag_info, 0x1);
arm_jtag_set_instr(jtag_info, jtag_info->intest_instr, NULL);
{
scan_field_t field;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_IDCODE, NULL);
{
scan_field_t field;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_IMPCODE, NULL);
int mips_ejtag_enter_debug(mips_ejtag_t *ejtag_info)
{
u32 ejtag_ctrl;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL);
/* set debug break bit */
u32 ejtag_ctrl = ejtag_info->ejtag_ctrl;
/* read ejtag control reg */
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL);
mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
{
/* we have detected a reset, clear flag
* otherwise ejtag will not work */
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
ejtag_ctrl = ejtag_info->ejtag_ctrl & ~EJTAG_CTRL_ROCC;
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL);
{
if ((target->state == TARGET_RUNNING) || (target->state == TARGET_RESET))
{
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_NORMALBOOT, NULL);
target->state = TARGET_HALTED;
if (target->reset_halt)
{
/* use hardware to catch reset */
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_EJTAGBOOT, NULL);
}
else
{
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_NORMALBOOT, NULL);
}
u8 field2_check_value = 0x0;
u8 field2_check_mask = 0x1;
- jtag_add_end_state(TAP_DRPAUSE);
+ jtag_set_end_state(TAP_DRPAUSE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dcsr);
buf_set_u32(&field0, 1, 1, xscale->hold_rst);
fields[1].out_value = xscale->reg_cache->reg_list[XSCALE_DCSR].value;
fields[1].in_value = NULL;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
jtag_add_dr_scan(3, fields, jtag_get_end_state());
fields[2].check_value = &field2_check_value;
fields[2].check_mask = &field2_check_mask;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dbgtx);
jtag_add_runtest(1, jtag_get_end_state()); /* ensures that we're in the TAP_IDLE state as the above could be a no-op */
fields[1].in_value = (u8 *)(field1+i);
- jtag_add_dr_scan_check(3, fields, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan_check(3, fields, jtag_set_end_state(TAP_IDLE));
jtag_add_callback(xscale_getbuf, (u8 *)(field1+i));
u8 field2_check_value = 0x0;
u8 field2_check_mask = 0x1;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dbgtx);
jtag_add_pathmove(sizeof(noconsume_path)/sizeof(*noconsume_path), noconsume_path);
}
- jtag_add_dr_scan(3, fields, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_IDLE));
jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
u8 field2_check_value = 0x0;
u8 field2_check_mask = 0x1;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dbgrx);
LOG_DEBUG("polling RX");
for (;;)
{
- jtag_add_dr_scan(3, fields, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_IDLE));
jtag_check_value_mask(fields+0, &field0_check_value, &field0_check_mask);
jtag_check_value_mask(fields+2, &field2_check_value, &field2_check_mask);
/* set rx_valid */
field2 = 0x1;
- jtag_add_dr_scan(3, fields, jtag_add_end_state(TAP_IDLE));
+ jtag_add_dr_scan(3, fields, jtag_set_end_state(TAP_IDLE));
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
int done_count = 0;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dbgrx);
3,
bits,
t,
- jtag_add_end_state(TAP_IDLE));
+ jtag_set_end_state(TAP_IDLE));
buffer += size;
}
if (ext_dbg_brk != -1)
xscale->external_debug_break = ext_dbg_brk;
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dcsr);
buf_set_u32(&field0, 1, 1, xscale->hold_rst);
LOG_DEBUG("loading miniIC at 0x%8.8x", va);
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.ldic); /* LDIC */
/* CMD is b010 for Main IC and b011 for Mini IC */
scan_field_t fields[2];
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.ldic); /* LDIC */
/* CMD for invalidate IC line b000, bits [6:4] b000 */
/* select DCSR instruction (set endstate to R-T-I to ensure we don't
* end up in T-L-R, which would reset JTAG
*/
- jtag_add_end_state(TAP_IDLE);
+ jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(xscale->jtag_info.tap, xscale->jtag_info.dcsr);
/* set Hold reset, Halt mode and Trap Reset */
/* wait 300ms; 150 and 100ms were not enough */
jtag_add_sleep(300*1000);
- jtag_add_runtest(2030, jtag_add_end_state(TAP_IDLE));
+ jtag_add_runtest(2030, jtag_set_end_state(TAP_IDLE));
jtag_execute_queue();
/* set Hold reset, Halt mode and Trap Reset */
xscale_load_ic(target, 1, 0x0, xscale->low_vectors);
xscale_load_ic(target, 1, 0xffff0000, xscale->high_vectors);
- jtag_add_runtest(30, jtag_add_end_state(TAP_IDLE));
+ jtag_add_runtest(30, jtag_set_end_state(TAP_IDLE));
jtag_add_sleep(100000);
field.in_value = calloc(CEIL(field.num_bits, 8), 1);
if (tap == NULL)
- jtag_add_plain_dr_scan(1, &field, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_plain_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
else
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
jtag_check_value_mask(&field, dr_in_buf, dr_in_mask);
LOG_USER("LSDR retry %d", attempt);
if (tap == NULL)
- jtag_add_plain_dr_scan(1, &field, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_plain_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
else
- jtag_add_dr_scan(1, &field, jtag_add_end_state(TAP_DRPAUSE));
+ jtag_add_dr_scan(1, &field, jtag_set_end_state(TAP_DRPAUSE));
jtag_check_value_mask(&field, dr_in_buf, dr_in_mask);