Remove useless structure typedef.
if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
{
- scan_field_t field;
+ struct scan_field field;
field.tap = tap;
field.num_bits = tap->ir_length;
static uint8_t str9xpec_isc_status(struct jtag_tap *tap)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t status;
if (str9xpec_set_instr(tap, ISC_NOOP, TAP_IRPAUSE) != ERROR_OK)
static int str9xpec_read_config(struct flash_bank_s *bank)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t status;
struct jtag_tap *tap;
static int str9xpec_blank_check(struct flash_bank_s *bank, int first, int last)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t status;
struct jtag_tap *tap;
int i;
static int str9xpec_erase_area(struct flash_bank_s *bank, int first, int last)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t status;
struct jtag_tap *tap;
int i;
static int str9xpec_lock_device(struct flash_bank_s *bank)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t status;
struct jtag_tap *tap;
str9xpec_flash_controller_t *str9xpec_info = NULL;
static int str9xpec_set_address(struct flash_bank_s *bank, uint8_t sector)
{
struct jtag_tap *tap;
- scan_field_t field;
+ struct scan_field field;
str9xpec_flash_controller_t *str9xpec_info = bank->driver_priv;
tap = str9xpec_info->tap;
uint8_t status;
uint32_t check_address = offset;
struct jtag_tap *tap;
- scan_field_t field;
+ struct scan_field field;
uint8_t *scanbuf;
int i;
int first_sector = 0;
COMMAND_HANDLER(str9xpec_handle_part_id_command)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t *buffer = NULL;
struct jtag_tap *tap;
uint32_t idcode;
static int str9xpec_write_options(struct flash_bank_s *bank)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t status;
struct jtag_tap *tap;
str9xpec_flash_controller_t *str9xpec_info = NULL;
static int in_idx; /* index of byte being scanned */
static uint8_t in_mask; /* mask of next bit to be scanned */
- scan_field_t* field;
+ struct scan_field* field;
int tdo;
/* loop through the queue */
}
-void bitq_scan_field(scan_field_t* field, int pause)
+void bitq_scan_field(struct scan_field* field, int pause)
{
int bit_cnt;
int tdo_req;
/// number of fields in *fields array
int num_fields;
/// pointer to an array of data scan fields
- scan_field_t* fields;
+ struct scan_field* fields;
/// state in which JTAG commands should finish
tap_state_t end_state;
} scan_command_t;
/// The number of JTAG queue flushes (for profiling and debugging purposes).
static int jtag_flush_queue_count;
-static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state),
- int in_num_fields, scan_field_t *in_fields, tap_state_t state);
+static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const struct scan_field *in_fields, tap_state_t state),
+ int in_num_fields, struct scan_field *in_fields, tap_state_t state);
/**
* The jtag_error variable is set when an error occurs while executing
cmd_queue_cur_state = state;
}
-void jtag_alloc_in_value32(scan_field_t *field)
+void jtag_alloc_in_value32(struct scan_field *field)
{
interface_jtag_alloc_in_value32(field);
}
-void jtag_add_ir_scan_noverify(int in_count, const scan_field_t *in_fields,
+void jtag_add_ir_scan_noverify(int in_count, const struct scan_field *in_fields,
tap_state_t state)
{
jtag_prelude(state);
}
-void jtag_add_ir_scan(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+void jtag_add_ir_scan(int in_num_fields, struct scan_field *in_fields, tap_state_t state)
{
assert(state != TAP_RESET);
}
}
-void jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_fields,
+void jtag_add_plain_ir_scan(int in_num_fields, const struct scan_field *in_fields,
tap_state_t state)
{
assert(state != TAP_RESET);
return jtag_check_value_inner((uint8_t *)data0, (uint8_t *)data1, (uint8_t *)data2, (int)data3);
}
-static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const scan_field_t *in_fields, tap_state_t state),
- int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const struct scan_field *in_fields, tap_state_t state),
+ int in_num_fields, struct scan_field *in_fields, tap_state_t state)
{
for (int i = 0; i < in_num_fields; i++)
{
- struct scan_field_s *field = &in_fields[i];
+ struct scan_field *field = &in_fields[i];
field->allocated = 0;
field->modified = 0;
if (field->check_value || field->in_value)
}
}
-void jtag_add_dr_scan_check(int in_num_fields, scan_field_t *in_fields, tap_state_t state)
+void jtag_add_dr_scan_check(int in_num_fields, struct scan_field *in_fields, tap_state_t state)
{
if (jtag_verify)
{
}
-void jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields,
+void jtag_add_dr_scan(int in_num_fields, const struct scan_field *in_fields,
tap_state_t state)
{
assert(state != TAP_RESET);
jtag_set_error(retval);
}
-void jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields,
+void jtag_add_plain_dr_scan(int in_num_fields, const struct scan_field *in_fields,
tap_state_t state)
{
assert(state != TAP_RESET);
return retval;
}
-void jtag_check_value_mask(scan_field_t *field, uint8_t *value, uint8_t *mask)
+void jtag_check_value_mask(struct scan_field *field, uint8_t *value, uint8_t *mask)
{
assert(field->in_value != NULL);
static int jtag_examine_chain_execute(uint8_t *idcode_buffer, unsigned num_idcode)
{
- scan_field_t field = {
+ struct scan_field field = {
.tap = NULL,
.num_bits = num_idcode * 32,
.out_value = idcode_buffer,
struct jtag_tap *tap;
int total_ir_length = 0;
uint8_t *ir_test = NULL;
- scan_field_t field;
+ struct scan_field field;
int val;
int chain_pos = 0;
int retval;
}
/**
- * Copy a scan_field_t for insertion into the queue.
+ * Copy a struct scan_field for insertion into the queue.
*
* This allocates a new copy of out_value using cmd_queue_alloc.
*/
-static void cmd_queue_scan_field_clone(scan_field_t * dst, const scan_field_t * src)
+static void cmd_queue_scan_field_clone(struct scan_field * dst, const struct scan_field * src)
{
dst->tap = src->tap;
dst->num_bits = src->num_bits;
* see jtag_add_ir_scan()
*
*/
-int interface_jtag_add_ir_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int interface_jtag_add_ir_scan(int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
{
size_t num_taps = jtag_tap_count_enabled();
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
- scan_field_t * out_fields = cmd_queue_alloc(num_taps * sizeof(scan_field_t));
+ struct scan_field * out_fields = cmd_queue_alloc(num_taps * sizeof(struct scan_field));
jtag_queue_command(cmd);
scan->end_state = state;
- scan_field_t * field = out_fields; /* keep track where we insert data */
+ struct scan_field * field = out_fields; /* keep track where we insert data */
/* loop over all enabled TAPs */
* see jtag_add_plain_ir_scan()
*
*/
-int interface_jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int interface_jtag_add_plain_ir_scan(int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
{
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
- scan_field_t * out_fields = cmd_queue_alloc(in_num_fields * sizeof(scan_field_t));
+ struct scan_field * out_fields = cmd_queue_alloc(in_num_fields * sizeof(struct scan_field));
jtag_queue_command(cmd);
* see jtag_add_dr_scan()
*
*/
-int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int interface_jtag_add_dr_scan(int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
{
/* count devices in bypass */
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
- scan_field_t * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(scan_field_t));
+ struct scan_field * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(struct scan_field));
jtag_queue_command(cmd);
scan->end_state = state;
- scan_field_t * field = out_fields; /* keep track where we insert data */
+ struct scan_field * field = out_fields; /* keep track where we insert data */
/* loop over all enabled TAPs */
if (!tap->bypass)
{
- scan_field_t * start_field = field; /* keep initial position for assert() */
+ struct scan_field * start_field = field; /* keep initial position for assert() */
for (int j = 0; j < in_num_fields; j++)
{
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
- scan_field_t * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(scan_field_t));
+ struct scan_field * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(struct scan_field));
jtag_queue_command(cmd);
bool target_tap_match = false;
- scan_field_t * field = out_fields; /* keep track where we insert data */
+ struct scan_field * field = out_fields; /* keep track where we insert data */
/* loop over all enabled TAPs */
* see jtag_add_plain_dr_scan()
*
*/
-int interface_jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
+int interface_jtag_add_plain_dr_scan(int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
{
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
- scan_field_t * out_fields = cmd_queue_alloc(in_num_fields * sizeof(scan_field_t));
+ struct scan_field * out_fields = cmd_queue_alloc(in_num_fields * sizeof(struct scan_field));
jtag_queue_command(cmd);
*
* The allocated, modified, and intmp fields are internal work space.
*/
-typedef struct scan_field_s
-{
+struct scan_field {
/// A pointer to the tap structure to which this field refers.
struct jtag_tap* tap;
int modified;
/// temporary storage for performing value checks synchronously
uint8_t intmp[4];
-} scan_field_t;
+};
typedef struct jtag_tap_event_action_s jtag_tap_event_action_t;
*
*/
void jtag_add_ir_scan(int num_fields,
- scan_field_t* fields, tap_state_t endstate);
+ struct scan_field* fields, tap_state_t endstate);
/**
* The same as jtag_add_ir_scan except no verification is performed out
* the output values.
*/
void jtag_add_ir_scan_noverify(int num_fields,
- const scan_field_t *fields, tap_state_t state);
+ const struct scan_field *fields, tap_state_t state);
/**
* Duplicate the scan fields passed into the function into an IR SCAN
* command. This function assumes that the caller handles extra fields
* for bypassed TAPs.
*/
void jtag_add_plain_ir_scan(int num_fields,
- const scan_field_t* fields, tap_state_t endstate);
+ const struct scan_field* fields, tap_state_t endstate);
/**
* allocation method is used, for the synchronous case the temporary 32
* bits come from the input field itself.
*/
-void jtag_alloc_in_value32(scan_field_t *field);
+void jtag_alloc_in_value32(struct scan_field *field);
/**
* Generate a DR SCAN using the fields passed to the function.
* 1-bit field. The bypass status of TAPs is set by jtag_add_ir_scan().
*/
void jtag_add_dr_scan(int num_fields,
- const scan_field_t* fields, tap_state_t endstate);
+ const struct scan_field* fields, tap_state_t endstate);
/// A version of jtag_add_dr_scan() that uses the check_value/mask fields
void jtag_add_dr_scan_check(int num_fields,
- scan_field_t* fields, tap_state_t endstate);
+ struct scan_field* fields, tap_state_t endstate);
/**
* Duplicate the scan fields passed into the function into a DR SCAN
* command. Unlike jtag_add_dr_scan(), this function assumes that the
* caller handles extra fields for bypassed TAPs.
*/
void jtag_add_plain_dr_scan(int num_fields,
- const scan_field_t* fields, tap_state_t endstate);
+ const struct scan_field* fields, tap_state_t endstate);
/**
* Defines the type of data passed to the jtag_callback_t interface.
* @param mask Pointer to scan mask; may be NULL.
* @returns Nothing, but calls jtag_set_error() on any error.
*/
-void jtag_check_value_mask(scan_field_t *field, uint8_t *value, uint8_t *mask);
+void jtag_check_value_mask(struct scan_field *field, uint8_t *value, uint8_t *mask);
void jtag_sleep(uint32_t us);
#include "jtag_minidriver.h"
-static inline void interface_jtag_alloc_in_value32(scan_field_t *field)
+static inline void interface_jtag_alloc_in_value32(struct scan_field *field)
{
field->in_value = field->intmp;
}
-static inline void interface_jtag_add_scan_check_alloc(scan_field_t *field)
+static inline void interface_jtag_add_scan_check_alloc(struct scan_field *field)
{
/* We're executing this synchronously, so try to use local storage. */
if (field->num_bits > 32)
#include "commands.h"
-static inline void interface_jtag_alloc_in_value32(scan_field_t *field)
+static inline void interface_jtag_alloc_in_value32(struct scan_field *field)
{
field->in_value = (uint8_t *)cmd_queue_alloc(4);
}
-static inline void interface_jtag_add_scan_check_alloc(scan_field_t *field)
+static inline void interface_jtag_add_scan_check_alloc(struct scan_field *field)
{
unsigned num_bytes = TAP_SCAN_BYTES(field->num_bits);
field->in_value = (uint8_t *)cmd_queue_alloc(num_bytes);
#endif
int interface_jtag_add_ir_scan(
- int num_fields, const scan_field_t* fields,
+ int num_fields, const struct scan_field* fields,
tap_state_t endstate);
int interface_jtag_add_plain_ir_scan(
- int num_fields, const scan_field_t* fields,
+ int num_fields, const struct scan_field* fields,
tap_state_t endstate);
int interface_jtag_add_dr_scan(
- int num_fields, const scan_field_t* fields,
+ int num_fields, const struct scan_field* fields,
tap_state_t endstate);
int interface_jtag_add_plain_dr_scan(
- int num_fields, const scan_field_t* fields,
+ int num_fields, const struct scan_field* fields,
tap_state_t endstate);
int interface_jtag_add_tlr(void);
extern int jtag_check_value(uint8_t *captured, void *priv);
-int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_ir_scan(int num_fields, const struct scan_field *fields, tap_state_t state)
{
/* synchronously do the operation here */
-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 struct scan_field *fields, tap_state_t state)
{
/* synchronously do the operation here */
/*extern jtag_command_t **jtag_get_last_command_p(void);*/
-int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_dr_scan(int num_fields, const struct scan_field *fields, tap_state_t state)
{
/* synchronously do the operation here */
return ERROR_OK;
}
-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 struct scan_field *fields, tap_state_t state)
{
/* synchronously do the operation here */
COMMAND_HANDLER(handle_irscan_command)
{
int i;
- scan_field_t *fields;
+ struct scan_field *fields;
struct jtag_tap *tap;
tap_state_t endstate;
}
int num_fields = argc / 2;
- size_t fields_len = sizeof(scan_field_t) * num_fields;
+ size_t fields_len = sizeof(struct scan_field) * num_fields;
fields = malloc(fields_len);
memset(fields, 0, fields_len);
static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args)
{
int retval;
- scan_field_t *fields;
+ struct scan_field *fields;
int num_fields;
int field_count = 0;
int i, e;
}
num_fields = (argc-2)/2;
- fields = malloc(sizeof(scan_field_t) * num_fields);
+ fields = malloc(sizeof(struct scan_field) * num_fields);
for (i = 2; i < argc; i += 2)
{
long bits;
setCurrentState(end_state);
}
-static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_state_t shiftState, int pause)
+static __inline void scanFields(int num_fields, const struct scan_field *fields, tap_state_t shiftState, int pause)
{
int i;
int j;
}
}
-int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_ir_scan(int num_fields, const struct scan_field *fields, tap_state_t state)
{
int j;
/* if a device isn't listed, set it to BYPASS */
uint8_t ones[]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
- scan_field_t tmp;
+ struct scan_field tmp;
memset(&tmp, 0, sizeof(tmp));
tmp.out_value = ones;
tmp.num_bits = scan_size;
-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 struct scan_field *fields, tap_state_t state)
{
scanFields(num_fields, fields, TAP_IRSHIFT, 1);
gotoEndState(state);
/*extern jtag_command_t **jtag_get_last_command_p(void);*/
-int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+int interface_jtag_add_dr_scan(int num_fields, const struct scan_field *fields, tap_state_t state)
{
int j;
}
if (!found)
{
- scan_field_t tmp;
+ struct scan_field tmp;
/* program the scan field to 1 bit length, and ignore it's value */
tmp.num_bits = 1;
tmp.out_value = NULL;
return ERROR_OK;
}
-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 struct scan_field *fields, tap_state_t state)
{
scanFields(num_fields, fields, TAP_DRSHIFT, 1);
gotoEndState(state);
if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
{
- scan_field_t field;
+ struct scan_field field;
field.tap = tap;
field.num_bits = tap->ir_length;
int num_words, uint32_t *words)
{
virtex2_pld_device_t *virtex2_info = pld_device->driver_priv;
- scan_field_t scan_field;
+ struct scan_field scan_field;
uint8_t *values;
int i;
int num_words, uint32_t *words)
{
virtex2_pld_device_t *virtex2_info = pld_device->driver_priv;
- scan_field_t scan_field;
+ struct scan_field scan_field;
scan_field.tap = virtex2_info->tap;
scan_field.num_bits = 32;
xilinx_bit_file_t bit_file;
int retval;
unsigned int i;
- scan_field_t field;
+ struct scan_field field;
field.tap = virtex2_info->tap;
field.in_value = NULL;
// for XXR
svf_xxr_para_t *xxr_para_tmp;
uint8_t **pbuffer_tmp;
- scan_field_t field;
+ struct scan_field field;
// for STATE
tap_state_t *path = NULL, state;
arm11_add_IR(arm11, ARM11_INTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain5_fields[3];
+ struct scan_field chain5_fields[3];
arm11_setup_field(arm11, 32, NULL, &R(WDTR), chain5_fields + 0);
arm11_setup_field(arm11, 1, NULL, NULL, chain5_fields + 1);
arm11_add_IR(arm11, ARM11_EXTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain5_fields[3];
+ struct scan_field chain5_fields[3];
uint8_t Ready = 0; /* ignored */
uint8_t Valid = 0; /* ignored */
arm11_add_IR(arm11, ARM11_IDCODE, ARM11_TAP_DEFAULT);
- scan_field_t idcode_field;
+ struct scan_field idcode_field;
arm11_setup_field(arm11, 32, NULL, &arm11->device_id, &idcode_field);
arm11_add_IR(arm11, ARM11_INTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain0_fields[2];
+ struct scan_field chain0_fields[2];
arm11_setup_field(arm11, 32, NULL, &arm11->didr, chain0_fields + 0);
arm11_setup_field(arm11, 8, NULL, &arm11->implementor, chain0_fields + 1);
};
-int arm11_add_ir_scan_vc(int num_fields, scan_field_t *fields, tap_state_t state)
+int arm11_add_ir_scan_vc(int num_fields, struct scan_field *fields, tap_state_t state)
{
if (cmd_queue_cur_state == TAP_IRPAUSE)
jtag_add_pathmove(asizeof(arm11_move_pi_to_si_via_ci), arm11_move_pi_to_si_via_ci);
TAP_DREXIT2, TAP_DRUPDATE, TAP_DRSELECT, TAP_DRCAPTURE, TAP_DRSHIFT
};
-int arm11_add_dr_scan_vc(int num_fields, scan_field_t *fields, tap_state_t state)
+int arm11_add_dr_scan_vc(int num_fields, struct scan_field *fields, tap_state_t state)
{
if (cmd_queue_cur_state == TAP_DRPAUSE)
jtag_add_pathmove(asizeof(arm11_move_pd_to_sd_via_cd), arm11_move_pd_to_sd_via_cd);
}
-/** Code de-clutter: Construct scan_field_t to write out a value
+/** Code de-clutter: Construct struct scan_field to write out a value
*
* \param arm11 Target state variable.
* \param num_bits Length of the data field
* <em > (data is written when the JTAG queue is executed)</em>
* \param field target data structure that will be initialized
*/
-void arm11_setup_field(arm11_common_t * arm11, int num_bits, void * out_data, void * in_data, scan_field_t * field)
+void arm11_setup_field(arm11_common_t * arm11, int num_bits, void * out_data, void * in_data, struct scan_field * field)
{
field->tap = arm11->target->tap;
field->num_bits = num_bits;
JTAG_DEBUG("IR <= 0x%02x", instr);
- scan_field_t field;
+ struct scan_field field;
arm11_setup_field(arm11, 5, &instr, NULL, &field);
}
/** Verify shifted out data from Scan Chain Register (SCREG)
- * Used as parameter to scan_field_t::in_handler in
+ * Used as parameter to struct scan_field::in_handler in
* arm11_add_debug_SCAN_N().
*
*/
arm11_add_IR(arm11, ARM11_SCAN_N, ARM11_TAP_DEFAULT);
- scan_field_t field;
+ struct scan_field field;
uint8_t tmp[1];
arm11_setup_field(arm11, 5, &chain, &tmp, &field);
{
JTAG_DEBUG("INST <= 0x%08x", inst);
- scan_field_t itr[2];
+ struct scan_field itr[2];
arm11_setup_field(arm11, 32, &inst, NULL, itr + 0);
arm11_setup_field(arm11, 1, NULL, flag, itr + 1);
arm11_add_IR(arm11, ARM11_INTEST, ARM11_TAP_DEFAULT);
uint32_t dscr;
- scan_field_t chain1_field;
+ struct scan_field chain1_field;
arm11_setup_field(arm11, 32, NULL, &dscr, &chain1_field);
arm11_add_IR(arm11, ARM11_EXTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain1_field;
+ struct scan_field chain1_field;
arm11_setup_field(arm11, 32, &dscr, NULL, &chain1_field);
arm11_add_IR(arm11, ARM11_EXTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain5_fields[3];
+ struct scan_field chain5_fields[3];
uint32_t Data;
uint8_t Ready;
arm11_add_IR(arm11, ARM11_EXTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain5_fields[3];
+ struct scan_field chain5_fields[3];
arm11_setup_field(arm11, 32, NULL/*&Data*/, NULL, chain5_fields + 0);
arm11_setup_field(arm11, 1, NULL, NULL /*&Ready*/, chain5_fields + 1);
arm11_add_IR(arm11, ARM11_INTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain5_fields[3];
+ struct scan_field chain5_fields[3];
uint32_t Data;
uint8_t Ready;
arm11_add_IR(arm11, ARM11_EXTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain7_fields[3];
+ struct scan_field chain7_fields[3];
uint8_t nRW;
uint32_t DataOut;
/* Uses INTEST for read and write */
arm11_add_IR(arm11, ARM11_INTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain6_fields[3];
+ struct scan_field chain6_fields[3];
uint8_t nRW = 1;
/* Uses INTEST for read and write */
arm11_add_IR(arm11, ARM11_INTEST, ARM11_TAP_DEFAULT);
- scan_field_t chain6_fields[3];
+ struct scan_field chain6_fields[3];
uint8_t nRW = 0;
/* ARM11 internals */
void arm11_setup_field(arm11_common_t *arm11, int num_bits,
- void *in_data, void *out_data, scan_field_t *field);
+ void *in_data, void *out_data, struct scan_field *field);
void arm11_add_IR(arm11_common_t *arm11,
uint8_t instr, tap_state_t state);
int arm11_add_debug_SCAN_N(arm11_common_t *arm11,
int arm11_run_instr_data_to_core_via_r0(arm11_common_t *arm11,
uint32_t opcode, uint32_t data);
-int arm11_add_dr_scan_vc(int num_fields, scan_field_t *fields,
+int arm11_add_dr_scan_vc(int num_fields, struct scan_field *fields,
tap_state_t state);
-int arm11_add_ir_scan_vc(int num_fields, scan_field_t *fields,
+int arm11_add_ir_scan_vc(int num_fields, struct scan_field *fields,
tap_state_t state);
/**
int retval;
struct arm720t_common_s *arm720t = target_to_arm720(target);
arm_jtag_t *jtag_info;
- scan_field_t fields[2];
+ struct scan_field fields[2];
uint8_t out_buf[4];
uint8_t instruction_buf = instruction;
if ((target->debug_reason != DBG_REASON_DBGRQ)
&& (target->debug_reason != DBG_REASON_SINGLESTEP))
{
- scan_field_t fields[2];
+ struct scan_field fields[2];
uint8_t databus[4];
uint8_t breakpoint;
static int arm7tdmi_clock_data_in(arm_jtag_t *jtag_info, uint32_t *in)
{
int retval = ERROR_OK;
- scan_field_t fields[2];
+ struct scan_field fields[2];
jtag_set_end_state(TAP_DRPAUSE);
if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
void *in, int size, int be)
{
int retval = ERROR_OK;
- scan_field_t fields[2];
+ struct scan_field fields[2];
jtag_set_end_state(TAP_DRPAUSE);
if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
{
struct arm920t_common_s *arm920t = target_to_arm920(target);
arm_jtag_t *jtag_info;
- scan_field_t fields[4];
+ struct scan_field fields[4];
uint8_t access_type_buf = 1;
uint8_t reg_addr_buf = reg_addr & 0x3f;
uint8_t nr_w_buf = 0;
{
struct arm920t_common_s *arm920t = target_to_arm920(target);
arm_jtag_t *jtag_info;
- scan_field_t fields[4];
+ struct scan_field fields[4];
uint8_t access_type_buf = 1;
uint8_t reg_addr_buf = reg_addr & 0x3f;
uint8_t nr_w_buf = 1;
int retval;
struct arm920t_common_s *arm920t = target_to_arm920(target);
arm_jtag_t *jtag_info;
- scan_field_t fields[4];
+ struct scan_field fields[4];
uint8_t access_type_buf = 0; /* interpreted access */
uint8_t reg_addr_buf = 0x0;
uint8_t nr_w_buf = 0;
struct arm7_9_common_s *arm7_9 = target_to_arm7_9(target);
arm_jtag_t *jtag_info = &arm7_9->jtag_info;
uint32_t address = ARM926EJS_CP15_ADDR(op1, op2, CRn, CRm);
- scan_field_t fields[4];
+ struct scan_field fields[4];
uint8_t address_buf[2];
uint8_t nr_w_buf = 0;
uint8_t access = 1;
struct arm7_9_common_s *arm7_9 = target_to_arm7_9(target);
arm_jtag_t *jtag_info = &arm7_9->jtag_info;
uint32_t address = ARM926EJS_CP15_ADDR(op1, op2, CRn, CRm);
- scan_field_t fields[4];
+ struct scan_field fields[4];
uint8_t value_buf[4];
uint8_t address_buf[2];
uint8_t nr_w_buf = 1;
int retval = ERROR_OK;
struct arm7_9_common_s *arm7_9 = target_to_arm7_9(target);
arm_jtag_t *jtag_info = &arm7_9->jtag_info;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t reg_addr_buf = reg_addr & 0x3f;
uint8_t nr_w_buf = 0;
int retval = ERROR_OK;
struct arm7_9_common_s *arm7_9 = target_to_arm7_9(target);
arm_jtag_t *jtag_info = &arm7_9->jtag_info;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t reg_addr_buf = reg_addr & 0x3f;
uint8_t nr_w_buf = 1;
uint8_t value_buf[4];
if ((target->debug_reason != DBG_REASON_DBGRQ)
&& (target->debug_reason != DBG_REASON_SINGLESTEP))
{
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t databus[4];
uint8_t instructionbus[4];
uint8_t debug_reason;
uint32_t out, uint32_t *in, int sysspeed)
{
int retval = ERROR_OK;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t out_buf[4];
uint8_t instr_buf[4];
uint8_t sysspeed_buf = 0x0;
int arm9tdmi_clock_data_in(arm_jtag_t *jtag_info, uint32_t *in)
{
int retval = ERROR_OK;;
- scan_field_t fields[3];
+ struct scan_field fields[3];
jtag_set_end_state(TAP_DRPAUSE);
if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
void *in, int size, int be)
{
int retval = ERROR_OK;
- scan_field_t fields[3];
+ struct scan_field fields[3];
jtag_set_end_state(TAP_DRPAUSE);
if ((retval = arm_jtag_scann(jtag_info, 0x1)) != ERROR_OK)
int adi_jtag_dp_scan(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint8_t *outvalue, uint8_t *invalue, uint8_t *ack)
{
arm_jtag_t *jtag_info = swjdp->jtag_info;
- scan_field_t fields[2];
+ struct scan_field fields[2];
uint8_t out_addr_buf;
jtag_set_end_state(TAP_IDLE);
int adi_jtag_dp_scan_u32(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr, uint8_t RnW, uint32_t outvalue, uint32_t *invalue, uint8_t *ack)
{
arm_jtag_t *jtag_info = swjdp->jtag_info;
- scan_field_t fields[2];
+ struct scan_field fields[2];
uint8_t out_value_buf[4];
uint8_t out_addr_buf;
if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t t[4];
field.tap = tap;
}
{
- scan_field_t field[1];
+ struct scan_field field[1];
field[0].tap = tap;
field[0].num_bits = tap->ir_length;
}
{
- scan_field_t field[1];
+ struct scan_field field[1];
field[0].tap = tap;
field[0].num_bits = dr_len;
{
embeddedice_reg_t *ice_reg = reg->arch_info;
uint8_t reg_addr = ice_reg->addr & 0x1f;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field1_out[1];
uint8_t field2_out[1];
*/
int embeddedice_receive(arm_jtag_t *jtag_info, uint32_t *data, uint32_t size)
{
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field1_out[1];
uint8_t field2_out[1];
*/
int embeddedice_send(arm_jtag_t *jtag_info, uint32_t *data, uint32_t size)
{
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field0_out[4];
uint8_t field1_out[1];
uint8_t field2_out[1];
*/
int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, uint32_t timeout)
{
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field0_in[4];
uint8_t field1_out[1];
uint8_t field2_out[1];
if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
{
- scan_field_t field;
+ struct scan_field field;
field.tap = tap;
field.num_bits = tap->ir_length;
{
if (etb->cur_scan_chain != new_scan_chain)
{
- scan_field_t field;
+ struct scan_field field;
field.tap = etb->tap;
field.num_bits = 5;
static int etb_read_ram(etb_t *etb, uint32_t *data, int num_frames)
{
- scan_field_t fields[3];
+ struct scan_field fields[3];
int i;
jtag_set_end_state(TAP_IDLE);
{
etb_reg_t *etb_reg = reg->arch_info;
uint8_t reg_addr = etb_reg->addr & 0x7f;
- scan_field_t fields[3];
+ struct scan_field fields[3];
LOG_DEBUG("%i", (int)(etb_reg->addr));
{
etb_reg_t *etb_reg = reg->arch_info;
uint8_t reg_addr = etb_reg->addr & 0x7f;
- scan_field_t fields[3];
+ struct scan_field fields[3];
LOG_DEBUG("%i: 0x%8.8" PRIx32 "", (int)(etb_reg->addr), value);
etm_reg_t *etm_reg = reg->arch_info;
const struct etm_reg_info *r = etm_reg->reg_info;
uint8_t reg_addr = r->addr & 0x7f;
- scan_field_t fields[3];
+ struct scan_field fields[3];
if (etm_reg->reg_info->mode == WO) {
LOG_ERROR("BUG: can't read write-only register %s", r->name);
etm_reg_t *etm_reg = reg->arch_info;
const struct etm_reg_info *r = etm_reg->reg_info;
uint8_t reg_addr = r->addr & 0x7f;
- scan_field_t fields[3];
+ struct scan_field fields[3];
if (etm_reg->reg_info->mode == RO) {
LOG_ERROR("BUG: can't write read--only register %s", r->name);
int feroceon_dummy_clock_out(arm_jtag_t *jtag_info, uint32_t instr)
{
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t out_buf[4];
uint8_t instr_buf[4];
uint8_t sysspeed_buf = 0x0;
if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != (uint32_t)new_instr)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t t[4];
field.tap = tap;
int mips_ejtag_get_idcode(mips_ejtag_t *ejtag_info, uint32_t *idcode)
{
- scan_field_t field;
+ struct scan_field field;
jtag_set_end_state(TAP_IDLE);
int mips_ejtag_get_impcode(mips_ejtag_t *ejtag_info, uint32_t *impcode)
{
- scan_field_t field;
+ struct scan_field field;
jtag_set_end_state(TAP_IDLE);
if (tap == NULL)
return ERROR_FAIL;
- scan_field_t field;
+ struct scan_field field;
uint8_t t[4], r[4];
int retval;
if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
{
- scan_field_t field;
+ struct scan_field field;
uint8_t scratch[4];
memset(&field, 0, sizeof field);
{
struct xscale_common_s *xscale = target_to_xscale(target);
int retval;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field0 = 0x0;
uint8_t field0_check_value = 0x2;
uint8_t field0_check_mask = 0x7;
int retval = ERROR_OK;
tap_state_t path[3];
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t *field0 = malloc(num_words * 1);
uint8_t field0_check_value = 0x2;
uint8_t field0_check_mask = 0x6;
tap_state_t noconsume_path[6];
int retval;
struct timeval timeout, now;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field0_in = 0x0;
uint8_t field0_check_value = 0x2;
uint8_t field0_check_mask = 0x6;
struct xscale_common_s *xscale = target_to_xscale(target);
int retval;
struct timeval timeout, now;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field0_out = 0x0;
uint8_t field0_in = 0x0;
uint8_t field0_check_value = 0x2;
{
struct xscale_common_s *xscale = target_to_xscale(target);
int retval;
- scan_field_t fields[3];
+ struct scan_field fields[3];
uint8_t field0 = 0x0;
uint8_t field0_check_value = 0x2;
uint8_t field0_check_mask = 0x7;
uint8_t packet[4];
uint8_t cmd;
int word;
- scan_field_t fields[2];
+ struct scan_field fields[2];
LOG_DEBUG("loading miniIC at 0x%8.8" PRIx32 "", va);
{
uint8_t packet[4];
uint8_t cmd;
- scan_field_t fields[2];
+ struct scan_field fields[2];
jtag_set_end_state(TAP_IDLE);
xscale_jtag_set_instr(target->tap, XSCALE_LDIC);
for (attempt = 0; attempt < limit; ++attempt)
{
- scan_field_t field;
+ struct scan_field field;
if (attempt > 0)
{
do_abort = 1;
else
{
- scan_field_t field;
+ struct scan_field field;
field.tap = tap;
field.num_bits = bitcount;
for (attempt = 0; attempt < limit; ++attempt)
{
- scan_field_t field;
+ struct scan_field field;
result = svf_add_statemove(loop_state);
jtag_add_clocks(loop_clocks);