summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/flash/str9xpec.c20
-rw-r--r--src/jtag/bitq.c4
-rw-r--r--src/jtag/commands.h2
-rw-r--r--src/jtag/core.c30
-rw-r--r--src/jtag/driver.c30
-rw-r--r--src/jtag/jtag.h21
-rw-r--r--src/jtag/minidriver.h16
-rw-r--r--src/jtag/minidummy/minidummy.c8
-rw-r--r--src/jtag/tcl.c8
-rw-r--r--src/jtag/zy1000/zy1000.c14
-rw-r--r--src/pld/virtex2.c8
-rw-r--r--src/svf/svf.c2
-rw-r--r--src/target/arm11.c8
-rw-r--r--src/target/arm11_dbgtap.c32
-rw-r--r--src/target/arm11_dbgtap.h6
-rw-r--r--src/target/arm720t.c2
-rw-r--r--src/target/arm7tdmi.c6
-rw-r--r--src/target/arm920t.c6
-rw-r--r--src/target/arm926ejs.c4
-rw-r--r--src/target/arm966e.c4
-rw-r--r--src/target/arm9tdmi.c8
-rw-r--r--src/target/arm_adi_v5.c4
-rw-r--r--src/target/arm_jtag.c2
-rw-r--r--src/target/avrt.c4
-rw-r--r--src/target/embeddedice.c8
-rw-r--r--src/target/etb.c10
-rw-r--r--src/target/etm.c4
-rw-r--r--src/target/feroceon.c2
-rw-r--r--src/target/mips_ejtag.c8
-rw-r--r--src/target/xscale.c16
-rw-r--r--src/xsvf/xsvf.c6
31 files changed, 151 insertions, 152 deletions
diff --git a/src/flash/str9xpec.c b/src/flash/str9xpec.c
index eabe21f6..83566df8 100644
--- a/src/flash/str9xpec.c
+++ b/src/flash/str9xpec.c
@@ -40,7 +40,7 @@ int str9xpec_set_instr(struct jtag_tap *tap, uint32_t new_instr, tap_state_t end
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;
@@ -58,7 +58,7 @@ int str9xpec_set_instr(struct jtag_tap *tap, uint32_t new_instr, tap_state_t end
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)
@@ -139,7 +139,7 @@ static int str9xpec_isc_disable(struct flash_bank_s *bank)
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;
@@ -271,7 +271,7 @@ FLASH_BANK_COMMAND_HANDLER(str9xpec_flash_bank_command)
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;
@@ -360,7 +360,7 @@ static int str9xpec_protect_check(struct flash_bank_s *bank)
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;
@@ -442,7 +442,7 @@ static int str9xpec_erase(struct flash_bank_s *bank, int first, int last)
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;
@@ -540,7 +540,7 @@ static int str9xpec_protect(struct flash_bank_s *bank, int set, int first, int l
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;
@@ -567,7 +567,7 @@ static int str9xpec_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t o
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;
@@ -728,7 +728,7 @@ static int str9xpec_probe(struct flash_bank_s *bank)
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;
@@ -835,7 +835,7 @@ COMMAND_HANDLER(str9xpec_handle_flash_options_read_command)
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;
diff --git a/src/jtag/bitq.c b/src/jtag/bitq.c
index cb7b511a..8ddde813 100644
--- a/src/jtag/bitq.c
+++ b/src/jtag/bitq.c
@@ -44,7 +44,7 @@ void bitq_in_proc(void)
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 */
@@ -213,7 +213,7 @@ void bitq_runtest(int num_cycles)
}
-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;
diff --git a/src/jtag/commands.h b/src/jtag/commands.h
index 5a76a8fb..ac440db6 100644
--- a/src/jtag/commands.h
+++ b/src/jtag/commands.h
@@ -53,7 +53,7 @@ typedef struct scan_command_s
/// 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;
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 9eee5e13..48af0406 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -43,8 +43,8 @@
/// 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
@@ -353,12 +353,12 @@ static void jtag_prelude(tap_state_t state)
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);
@@ -368,7 +368,7 @@ void jtag_add_ir_scan_noverify(int in_count, const scan_field_t *in_fields,
}
-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);
@@ -391,7 +391,7 @@ void jtag_add_ir_scan(int in_num_fields, scan_field_t *in_fields, tap_state_t st
}
}
-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);
@@ -423,12 +423,12 @@ static int jtag_check_value_mask_callback(jtag_callback_data_t data0, jtag_callb
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)
@@ -460,7 +460,7 @@ static void jtag_add_scan_check(void (*jtag_add_scan)(int in_num_fields, const s
}
}
-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)
{
@@ -472,7 +472,7 @@ void jtag_add_dr_scan_check(int in_num_fields, scan_field_t *in_fields, tap_stat
}
-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);
@@ -484,7 +484,7 @@ void jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields,
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);
@@ -806,7 +806,7 @@ static int jtag_check_value_inner(uint8_t *captured, uint8_t *in_check_value,
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);
@@ -895,7 +895,7 @@ void jtag_sleep(uint32_t us)
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,
@@ -1171,7 +1171,7 @@ static int jtag_validate_ircapture(void)
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;
diff --git a/src/jtag/driver.c b/src/jtag/driver.c
index da48fdc2..de7b789e 100644
--- a/src/jtag/driver.c
+++ b/src/jtag/driver.c
@@ -56,11 +56,11 @@ static void jtag_callback_queue_reset(void)
}
/**
- * 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;
@@ -73,13 +73,13 @@ static void cmd_queue_scan_field_clone(scan_field_t * dst, const scan_field_t *
* 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);
@@ -92,7 +92,7 @@ int interface_jtag_add_ir_scan(int in_num_fields, const scan_field_t *in_fields,
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 */
@@ -147,12 +147,12 @@ int interface_jtag_add_ir_scan(int in_num_fields, const scan_field_t *in_fields,
* 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);
@@ -176,7 +176,7 @@ int interface_jtag_add_plain_ir_scan(int in_num_fields, const scan_field_t *in_f
* 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 */
@@ -190,7 +190,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields,
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);
@@ -203,7 +203,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields,
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 */
@@ -213,7 +213,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields,
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++)
{
@@ -280,7 +280,7 @@ void interface_jtag_add_dr_out(struct jtag_tap *target_tap,
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);
@@ -295,7 +295,7 @@ void interface_jtag_add_dr_out(struct jtag_tap *target_tap,
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 */
@@ -344,11 +344,11 @@ void interface_jtag_add_dr_out(struct jtag_tap *target_tap,
* 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);
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 5224b6cc..713823a2 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -119,8 +119,7 @@ extern tap_state_t cmd_queue_cur_state;
*
* 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;
@@ -142,7 +141,7 @@ typedef struct scan_field_s
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;
@@ -360,20 +359,20 @@ int jtag_init_inner(struct command_context_s *cmd_ctx);
*
*/
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);
/**
@@ -385,7 +384,7 @@ void jtag_add_plain_ir_scan(int num_fields,
* 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.
@@ -394,17 +393,17 @@ void jtag_alloc_in_value32(scan_field_t *field);
* 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.
@@ -652,7 +651,7 @@ int jtag_srst_asserted(int* srst_asserted);
* @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);
diff --git a/src/jtag/minidriver.h b/src/jtag/minidriver.h
index 47400d13..49931b7b 100644
--- a/src/jtag/minidriver.h
+++ b/src/jtag/minidriver.h
@@ -48,12 +48,12 @@
#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)
@@ -70,12 +70,12 @@ static inline void interface_jtag_add_scan_check_alloc(scan_field_t *field)
#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);
@@ -94,17 +94,17 @@ void interface_jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0,
#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);
diff --git a/src/jtag/minidummy/minidummy.c b/src/jtag/minidummy/minidummy.c
index 4e21cc42..af98ec5f 100644
--- a/src/jtag/minidummy/minidummy.c
+++ b/src/jtag/minidummy/minidummy.c
@@ -59,7 +59,7 @@ int interface_jtag_execute_queue(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 */
@@ -71,7 +71,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 struct scan_field *fields, tap_state_t state)
{
/* synchronously do the operation here */
@@ -80,14 +80,14 @@ int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields,
/*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 */
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c
index abf875a7..04b3ed2f 100644
--- a/src/jtag/tcl.c
+++ b/src/jtag/tcl.c
@@ -1078,7 +1078,7 @@ static bool scan_is_safe(tap_state_t state)
COMMAND_HANDLER(handle_irscan_command)
{
int i;
- scan_field_t *fields;
+ struct scan_field *fields;
struct jtag_tap *tap;
tap_state_t endstate;
@@ -1108,7 +1108,7 @@ COMMAND_HANDLER(handle_irscan_command)
}
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);
@@ -1159,7 +1159,7 @@ error_return:
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;
@@ -1245,7 +1245,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
}
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;
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c
index 86192588..1a926ca9 100644
--- a/src/jtag/zy1000/zy1000.c
+++ b/src/jtag/zy1000/zy1000.c
@@ -462,7 +462,7 @@ static void gotoEndState(tap_state_t end_state)
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;
@@ -532,7 +532,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
}
}
-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;
@@ -568,7 +568,7 @@ int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_s
/* 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;
@@ -587,7 +587,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 struct scan_field *fields, tap_state_t state)
{
scanFields(num_fields, fields, TAP_IRSHIFT, 1);
gotoEndState(state);
@@ -597,7 +597,7 @@ int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields,
/*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;
@@ -619,7 +619,7 @@ int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_s
}
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;
@@ -635,7 +635,7 @@ int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_s
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);
diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c
index 2d06a0e9..56b4eee7 100644
--- a/src/pld/virtex2.c
+++ b/src/pld/virtex2.c
@@ -33,7 +33,7 @@ static int virtex2_set_instr(struct jtag_tap *tap, uint32_t new_instr)
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;
@@ -53,7 +53,7 @@ static int virtex2_send_32(struct pld_device_s *pld_device,
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;
@@ -86,7 +86,7 @@ static int virtex2_receive_32(struct pld_device_s *pld_device,
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;
@@ -137,7 +137,7 @@ static int virtex2_load(struct pld_device_s *pld_device, const char *filename)
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;
diff --git a/src/svf/svf.c b/src/svf/svf.c
index 4dea968f..348145d9 100644
--- a/src/svf/svf.c
+++ b/src/svf/svf.c
@@ -764,7 +764,7 @@ static int svf_run_command(struct command_context_s *cmd_ctx, char *cmd_str)
// 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;
diff --git a/src/target/arm11.c b/src/target/arm11.c
index 1dc1834b..23185488 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -360,7 +360,7 @@ static int arm11_on_enter_debug_state(arm11_common_t *arm11)
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);
@@ -637,7 +637,7 @@ static int arm11_leave_debug_state(arm11_common_t *arm11)
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 */
@@ -1821,7 +1821,7 @@ static int arm11_examine(struct target_s *target)
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);
@@ -1833,7 +1833,7 @@ static int arm11_examine(struct target_s *target)
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);
diff --git a/src/target/arm11_dbgtap.c b/src/target/arm11_dbgtap.c
index 369576c5..6154f34d 100644
--- a/src/target/arm11_dbgtap.c
+++ b/src/target/arm11_dbgtap.c
@@ -47,7 +47,7 @@ static const tap_state_t arm11_move_pi_to_si_via_ci[] =
};
-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);
@@ -61,7 +61,7 @@ static const tap_state_t arm11_move_pd_to_sd_via_cd[] =
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);
@@ -71,7 +71,7 @@ int arm11_add_dr_scan_vc(int num_fields, scan_field_t *fields, tap_state_t state
}
-/** 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
@@ -81,7 +81,7 @@ int arm11_add_dr_scan_vc(int num_fields, scan_field_t *fields, tap_state_t state
* <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;
@@ -111,7 +111,7 @@ void arm11_add_IR(arm11_common_t * arm11, uint8_t instr, tap_state_t state)
JTAG_DEBUG("IR <= 0x%02x", instr);
- scan_field_t field;
+ struct scan_field field;
arm11_setup_field(arm11, 5, &instr, NULL, &field);
@@ -119,7 +119,7 @@ void arm11_add_IR(arm11_common_t * arm11, uint8_t instr, tap_state_t state)
}
/** 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().
*
*/
@@ -167,7 +167,7 @@ int arm11_add_debug_SCAN_N(arm11_common_t * arm11, uint8_t chain, tap_state_t st
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);
@@ -202,7 +202,7 @@ void arm11_add_debug_INST(arm11_common_t * arm11, uint32_t inst, uint8_t * flag,
{
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);
@@ -230,7 +230,7 @@ int arm11_read_DSCR(arm11_common_t * arm11, uint32_t *value)
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);
@@ -266,7 +266,7 @@ int arm11_write_DSCR(arm11_common_t * arm11, uint32_t dscr)
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);
@@ -451,7 +451,7 @@ int arm11_run_instr_data_to_core(arm11_common_t * arm11, uint32_t opcode, uint32
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;
@@ -578,7 +578,7 @@ int arm11_run_instr_data_to_core_noack(arm11_common_t * arm11, uint32_t opcode,
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);
@@ -682,7 +682,7 @@ int arm11_run_instr_data_from_core(arm11_common_t * arm11, uint32_t opcode, uint
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;
@@ -799,7 +799,7 @@ int arm11_sc7_run(arm11_common_t * arm11, arm11_sc7_action_t * actions, size_t c
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;
@@ -959,7 +959,7 @@ int arm11_write_etm(arm11_common_t * arm11, uint8_t address, uint32_t value)
/* 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;
@@ -993,7 +993,7 @@ int arm11_read_etm(arm11_common_t * arm11, uint8_t address, uint32_t * value)
/* 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;
diff --git a/src/target/arm11_dbgtap.h b/src/target/arm11_dbgtap.h
index f8a793fa..fb37faa9 100644
--- a/src/target/arm11_dbgtap.h
+++ b/src/target/arm11_dbgtap.h
@@ -6,7 +6,7 @@
/* 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,
@@ -36,9 +36,9 @@ int arm11_run_instr_data_from_core_via_r0(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);
/**
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index 4e09228b..01ccf304 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -44,7 +44,7 @@ static int arm720t_scan_cp15(target_t *target,
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;
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 8bf46807..90e75262 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -50,7 +50,7 @@ static int arm7tdmi_examine_debug_reason(target_t *target)
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;
@@ -130,7 +130,7 @@ static __inline int arm7tdmi_clock_out(arm_jtag_t *jtag_info,
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)
@@ -217,7 +217,7 @@ static int arm7tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info,
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)
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index 9fe8fc4f..ca7728b0 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -56,7 +56,7 @@ static int arm920t_read_cp15_physical(target_t *target,
{
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;
@@ -108,7 +108,7 @@ static int arm920t_write_cp15_physical(target_t *target,
{
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;
@@ -157,7 +157,7 @@ static int arm920t_execute_cp15(target_t *target, uint32_t cp15_opcode,
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;
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index c8120b67..25c44a0e 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -54,7 +54,7 @@ static int arm926ejs_cp15_read(target_t *target, uint32_t op1, uint32_t op2,
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;
@@ -146,7 +146,7 @@ static int arm926ejs_cp15_write(target_t *target, uint32_t op1, uint32_t op2,
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;
diff --git a/src/target/arm966e.c b/src/target/arm966e.c
index b1fea08e..d3ae9b20 100644
--- a/src/target/arm966e.c
+++ b/src/target/arm966e.c
@@ -72,7 +72,7 @@ static int arm966e_read_cp15(target_t *target, int reg_addr, uint32_t *value)
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;
@@ -124,7 +124,7 @@ int arm966e_write_cp15(target_t *target, int reg_addr, uint32_t value)
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];
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index 56ce3652..d1d4a8de 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -66,7 +66,7 @@ int arm9tdmi_examine_debug_reason(target_t *target)
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;
@@ -128,7 +128,7 @@ int arm9tdmi_clock_out(arm_jtag_t *jtag_info, uint32_t instr,
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;
@@ -201,7 +201,7 @@ int arm9tdmi_clock_out(arm_jtag_t *jtag_info, uint32_t instr,
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)
@@ -273,7 +273,7 @@ int arm9tdmi_clock_data_in_endianness(arm_jtag_t *jtag_info,
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)
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index 4a7a37c0..7fc22d0e 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -74,7 +74,7 @@ static uint32_t max_tar_block_size(uint32_t tar_autoincr_block, uint32_t address
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);
@@ -104,7 +104,7 @@ int adi_jtag_dp_scan(swjdp_common_t *swjdp, uint8_t instr, uint8_t reg_addr, uin
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;
diff --git a/src/target/arm_jtag.c b/src/target/arm_jtag.c
index bcd4faab..4b5bd392 100644
--- a/src/target/arm_jtag.c
+++ b/src/target/arm_jtag.c
@@ -40,7 +40,7 @@ int arm_jtag_set_instr(arm_jtag_t *jtag_info, uint32_t new_instr, void *no_veri
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;
diff --git a/src/target/avrt.c b/src/target/avrt.c
index bff2418c..4a1024fe 100644
--- a/src/target/avrt.c
+++ b/src/target/avrt.c
@@ -200,7 +200,7 @@ int mcu_write_ir(struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_l
}
{
- scan_field_t field[1];
+ struct scan_field field[1];
field[0].tap = tap;
field[0].num_bits = tap->ir_length;
@@ -221,7 +221,7 @@ int mcu_write_dr(struct jtag_tap *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_l
}
{
- scan_field_t field[1];
+ struct scan_field field[1];
field[0].tap = tap;
field[0].num_bits = dr_len;
diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c
index 7b20e12c..a1eac134 100644
--- a/src/target/embeddedice.c
+++ b/src/target/embeddedice.c
@@ -333,7 +333,7 @@ int embeddedice_read_reg_w_check(reg_t *reg,
{
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];
@@ -398,7 +398,7 @@ int embeddedice_read_reg_w_check(reg_t *reg,
*/
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];
@@ -519,7 +519,7 @@ void embeddedice_store_reg(reg_t *reg)
*/
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];
@@ -564,7 +564,7 @@ int embeddedice_send(arm_jtag_t *jtag_info, uint32_t *data, uint32_t size)
*/
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];
diff --git a/src/target/etb.c b/src/target/etb.c
index 3ad73977..1315b71a 100644
--- a/src/target/etb.c
+++ b/src/target/etb.c
@@ -52,7 +52,7 @@ static int etb_set_instr(etb_t *etb, uint32_t new_instr)
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;
@@ -73,7 +73,7 @@ static int etb_scann(etb_t *etb, uint32_t new_scan_chain)
{
if (etb->cur_scan_chain != new_scan_chain)
{
- scan_field_t field;
+ struct scan_field field;
field.tap = etb->tap;
field.num_bits = 5;
@@ -173,7 +173,7 @@ static void etb_getbuf(jtag_callback_data_t arg)
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);
@@ -229,7 +229,7 @@ static int etb_read_reg_w_check(reg_t *reg,
{
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));
@@ -315,7 +315,7 @@ static int etb_write_reg(reg_t *reg, uint32_t value)
{
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);
diff --git a/src/target/etm.c b/src/target/etm.c
index 6d34f6c9..01a9b714 100644
--- a/src/target/etm.c
+++ b/src/target/etm.c
@@ -492,7 +492,7 @@ static int etm_read_reg_w_check(reg_t *reg,
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);
@@ -578,7 +578,7 @@ static int etm_write_reg(reg_t *reg, uint32_t 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 == RO) {
LOG_ERROR("BUG: can't write read--only register %s", r->name);
diff --git a/src/target/feroceon.c b/src/target/feroceon.c
index e1dc0686..b157dc3e 100644
--- a/src/target/feroceon.c
+++ b/src/target/feroceon.c
@@ -71,7 +71,7 @@ int feroceon_assert_reset(target_t *target)
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;
diff --git a/src/target/mips_ejtag.c b/src/target/mips_ejtag.c
index 021e3ab4..d23411f4 100644
--- a/src/target/mips_ejtag.c
+++ b/src/target/mips_ejtag.c
@@ -37,7 +37,7 @@ int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, int new_instr, void *delete_m
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;
@@ -54,7 +54,7 @@ int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, int new_instr, void *delete_m
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);
@@ -77,7 +77,7 @@ int mips_ejtag_get_idcode(mips_ejtag_t *ejtag_info, uint32_t *idcode)
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);
@@ -105,7 +105,7 @@ int mips_ejtag_drscan_32(mips_ejtag_t *ejtag_info, uint32_t *data)
if (tap == NULL)
return ERROR_FAIL;
- scan_field_t field;
+ struct scan_field field;
uint8_t t[4], r[4];
int retval;
diff --git a/src/target/xscale.c b/src/target/xscale.c
index c4d22b1d..3540f6a6 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -163,7 +163,7 @@ static int xscale_jtag_set_instr(struct jtag_tap *tap, uint32_t new_instr)
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);
@@ -182,7 +182,7 @@ static int xscale_read_dcsr(target_t *target)
{
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;
@@ -258,7 +258,7 @@ static int xscale_receive(target_t *target, uint32_t *buffer, int num_words)
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;
@@ -362,7 +362,7 @@ static int xscale_read_tx(target_t *target, int consume)
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;
@@ -458,7 +458,7 @@ static int xscale_write_rx(target_t *target)
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;
@@ -614,7 +614,7 @@ static int xscale_write_dcsr(target_t *target, int hold_rst, int ext_dbg_brk)
{
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;
@@ -686,7 +686,7 @@ static int xscale_load_ic(target_t *target, uint32_t va, uint32_t buffer[8])
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);
@@ -740,7 +740,7 @@ static int xscale_invalidate_ic_line(target_t *target, uint32_t 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);
diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c
index e1a30e6e..c6daf5fd 100644
--- a/src/xsvf/xsvf.c
+++ b/src/xsvf/xsvf.c
@@ -445,7 +445,7 @@ COMMAND_HANDLER(handle_xsvf_command)
for (attempt = 0; attempt < limit; ++attempt)
{
- scan_field_t field;
+ struct scan_field field;
if (attempt > 0)
{
@@ -692,7 +692,7 @@ COMMAND_HANDLER(handle_xsvf_command)
do_abort = 1;
else
{
- scan_field_t field;
+ struct scan_field field;
field.tap = tap;
field.num_bits = bitcount;
@@ -924,7 +924,7 @@ COMMAND_HANDLER(handle_xsvf_command)
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);