do not modify global end state from jtag_add_xxx()
git-svn-id: svn://svn.berlios.de/openocd/trunk@2047 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
89e9d86a56
commit
9e8dce64fc
|
@ -396,9 +396,7 @@ static void jtag_prelude(tap_state_t state)
|
||||||
|
|
||||||
assert(state!=TAP_INVALID);
|
assert(state!=TAP_INVALID);
|
||||||
|
|
||||||
jtag_add_end_state(state);
|
cmd_queue_cur_state = state;
|
||||||
|
|
||||||
cmd_queue_cur_state = cmd_queue_end_state;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void jtag_alloc_in_value32(scan_field_t *field)
|
void jtag_alloc_in_value32(scan_field_t *field)
|
||||||
|
@ -411,7 +409,7 @@ void jtag_add_ir_scan_noverify(int in_num_fields, const scan_field_t *in_fields,
|
||||||
int retval;
|
int retval;
|
||||||
jtag_prelude(state);
|
jtag_prelude(state);
|
||||||
|
|
||||||
retval=interface_jtag_add_ir_scan(in_num_fields, in_fields, cmd_queue_end_state);
|
retval=interface_jtag_add_ir_scan(in_num_fields, in_fields, state);
|
||||||
if (retval!=ERROR_OK)
|
if (retval!=ERROR_OK)
|
||||||
jtag_error=retval;
|
jtag_error=retval;
|
||||||
|
|
||||||
|
@ -460,7 +458,7 @@ void jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_fields, ta
|
||||||
|
|
||||||
jtag_prelude(state);
|
jtag_prelude(state);
|
||||||
|
|
||||||
retval=interface_jtag_add_plain_ir_scan(in_num_fields, in_fields, cmd_queue_end_state);
|
retval=interface_jtag_add_plain_ir_scan(in_num_fields, in_fields, state);
|
||||||
if (retval!=ERROR_OK)
|
if (retval!=ERROR_OK)
|
||||||
jtag_error=retval;
|
jtag_error=retval;
|
||||||
}
|
}
|
||||||
|
@ -548,7 +546,7 @@ void jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields, tap_stat
|
||||||
|
|
||||||
jtag_prelude(state);
|
jtag_prelude(state);
|
||||||
|
|
||||||
retval=interface_jtag_add_dr_scan(in_num_fields, in_fields, cmd_queue_end_state);
|
retval=interface_jtag_add_dr_scan(in_num_fields, in_fields, state);
|
||||||
if (retval!=ERROR_OK)
|
if (retval!=ERROR_OK)
|
||||||
jtag_error=retval;
|
jtag_error=retval;
|
||||||
}
|
}
|
||||||
|
@ -567,7 +565,7 @@ void jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields, ta
|
||||||
|
|
||||||
jtag_prelude(state);
|
jtag_prelude(state);
|
||||||
|
|
||||||
retval=interface_jtag_add_plain_dr_scan(in_num_fields, in_fields, cmd_queue_end_state);
|
retval=interface_jtag_add_plain_dr_scan(in_num_fields, in_fields, state);
|
||||||
if (retval!=ERROR_OK)
|
if (retval!=ERROR_OK)
|
||||||
jtag_error=retval;
|
jtag_error=retval;
|
||||||
}
|
}
|
||||||
|
@ -578,13 +576,11 @@ void jtag_add_dr_out(jtag_tap_t* tap,
|
||||||
{
|
{
|
||||||
assert(end_state != TAP_INVALID);
|
assert(end_state != TAP_INVALID);
|
||||||
|
|
||||||
cmd_queue_end_state = end_state;
|
cmd_queue_cur_state = end_state;
|
||||||
|
|
||||||
cmd_queue_cur_state = cmd_queue_end_state;
|
|
||||||
|
|
||||||
interface_jtag_add_dr_out(tap,
|
interface_jtag_add_dr_out(tap,
|
||||||
num_fields, num_bits, value,
|
num_fields, num_bits, value,
|
||||||
cmd_queue_end_state);
|
end_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void jtag_add_tlr(void)
|
void jtag_add_tlr(void)
|
||||||
|
@ -644,7 +640,7 @@ void jtag_add_runtest(int num_cycles, tap_state_t state)
|
||||||
jtag_prelude(state);
|
jtag_prelude(state);
|
||||||
|
|
||||||
/* executed by sw or hw fifo */
|
/* executed by sw or hw fifo */
|
||||||
retval=interface_jtag_add_runtest(num_cycles, cmd_queue_end_state);
|
retval=interface_jtag_add_runtest(num_cycles, state);
|
||||||
if (retval!=ERROR_OK)
|
if (retval!=ERROR_OK)
|
||||||
jtag_error=retval;
|
jtag_error=retval;
|
||||||
}
|
}
|
||||||
|
|
|
@ -517,7 +517,7 @@ int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_s
|
||||||
tap_state_t end_state;
|
tap_state_t end_state;
|
||||||
if (nextTap==NULL)
|
if (nextTap==NULL)
|
||||||
{
|
{
|
||||||
end_state = cmd_queue_end_state;
|
end_state = state;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
end_state = TAP_IRSHIFT;
|
end_state = TAP_IRSHIFT;
|
||||||
|
@ -568,7 +568,7 @@ int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_s
|
||||||
|
|
||||||
int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
|
int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
|
||||||
{
|
{
|
||||||
scanFields(num_fields, fields, TAP_IRSHIFT, cmd_queue_end_state);
|
scanFields(num_fields, fields, TAP_IRSHIFT, state);
|
||||||
|
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
@ -587,7 +587,7 @@ int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_s
|
||||||
tap_state_t end_state;
|
tap_state_t end_state;
|
||||||
if (nextTap==NULL)
|
if (nextTap==NULL)
|
||||||
{
|
{
|
||||||
end_state = cmd_queue_end_state;
|
end_state = state;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
end_state = TAP_DRSHIFT;
|
end_state = TAP_DRSHIFT;
|
||||||
|
@ -621,7 +621,7 @@ int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_s
|
||||||
|
|
||||||
int interface_jtag_add_plain_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
|
int interface_jtag_add_plain_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
|
||||||
{
|
{
|
||||||
scanFields(num_fields, fields, TAP_DRSHIFT, cmd_queue_end_state);
|
scanFields(num_fields, fields, TAP_DRSHIFT, state);
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -693,7 +693,7 @@ int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
|
||||||
|
|
||||||
int interface_jtag_add_clocks(int num_cycles)
|
int interface_jtag_add_clocks(int num_cycles)
|
||||||
{
|
{
|
||||||
return zy1000_jtag_add_clocks(num_cycles, cmd_queue_cur_state, cmd_queue_end_state);
|
return zy1000_jtag_add_clocks(num_cycles, cmd_queue_cur_state, cmd_queue_cur_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
int interface_jtag_add_sleep(u32 us)
|
int interface_jtag_add_sleep(u32 us)
|
||||||
|
|
Loading…
Reference in New Issue