#include "mips32.h"
#include "mips_ejtag.h"
-int mips_ejtag_set_instr(struct mips_ejtag *ejtag_info, int new_instr, void *delete_me_and_submit_patch)
+int mips_ejtag_set_instr(struct mips_ejtag *ejtag_info, int new_instr)
{
struct jtag_tap *tap;
field.num_bits = tap->ir_length;
field.out_value = t;
- buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
+ buf_set_u32(t, 0, field.num_bits, new_instr);
field.in_value = NULL;
- jtag_add_ir_scan(tap, &field, jtag_get_end_state());
+ jtag_add_ir_scan(tap, &field, TAP_IDLE);
}
return ERROR_OK;
{
struct scan_field field;
- jtag_set_end_state(TAP_IDLE);
-
- mips_ejtag_set_instr(ejtag_info, EJTAG_INST_IDCODE, NULL);
+ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_IDCODE);
field.num_bits = 32;
field.out_value = NULL;
{
struct scan_field field;
- jtag_set_end_state(TAP_IDLE);
-
- mips_ejtag_set_instr(ejtag_info, EJTAG_INST_IMPCODE, NULL);
+ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_IMPCODE);
field.num_bits = 32;
field.out_value = NULL;
field.num_bits = 32;
field.out_value = t;
- buf_set_u32(field.out_value, 0, field.num_bits, *data);
+ buf_set_u32(t, 0, field.num_bits, *data);
field.in_value = r;
- jtag_add_dr_scan(tap, 1, &field, jtag_get_end_state());
+ jtag_add_dr_scan(tap, 1, &field, TAP_IDLE);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
field.num_bits = 8;
field.out_value = t;
- buf_set_u32(field.out_value, 0, field.num_bits, *data);
+ buf_set_u32(t, 0, field.num_bits, *data);
field.in_value = r;
- jtag_add_dr_scan(tap, 1, &field, jtag_get_end_state());
+ jtag_add_dr_scan(tap, 1, &field, TAP_IDLE);
if ((retval = jtag_execute_queue()) != ERROR_OK)
{
int mips_ejtag_enter_debug(struct mips_ejtag *ejtag_info)
{
uint32_t ejtag_ctrl;
- jtag_set_end_state(TAP_IDLE);
- mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL, NULL);
+ mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL);
/* set debug break bit */
ejtag_ctrl = ejtag_info->ejtag_ctrl | EJTAG_CTRL_JTAGBRK;
fields[1].in_value = (uint8_t *) data;
}
- jtag_add_dr_scan(tap, 2, fields, jtag_get_end_state());
+ jtag_add_dr_scan(tap, 2, fields, TAP_IDLE);
keep_alive();
return ERROR_OK;