diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 03:28:03 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 11:58:04 -0800 |
commit | d0809ac060b35a04e7f0bceb96e1868663bd18df (patch) | |
tree | 0159124f313879de7b193eee02183d9abd9854e5 | |
parent | 42ef503d37b18d907da16d26e99167566d5aabd1 (diff) |
scan_field_t -> struct scan_field
Remove useless structure typedef.
-rw-r--r-- | src/flash/str9xpec.c | 20 | ||||
-rw-r--r-- | src/jtag/bitq.c | 4 | ||||
-rw-r--r-- | src/jtag/commands.h | 2 | ||||
-rw-r--r-- | src/jtag/core.c | 30 | ||||
-rw-r--r-- | src/jtag/driver.c | 30 | ||||
-rw-r--r-- | src/jtag/jtag.h | 21 | ||||
-rw-r--r-- | src/jtag/minidriver.h | 16 | ||||
-rw-r--r-- | src/jtag/minidummy/minidummy.c | 8 | ||||
-rw-r--r-- | src/jtag/tcl.c | 8 | ||||
-rw-r--r-- | src/jtag/zy1000/zy1000.c | 14 | ||||
-rw-r--r-- | src/pld/virtex2.c | 8 | ||||
-rw-r--r-- | src/svf/svf.c | 2 | ||||
-rw-r--r-- | src/target/arm11.c | 8 | ||||
-rw-r--r-- | src/target/arm11_dbgtap.c | 32 | ||||
-rw-r--r-- | src/target/arm11_dbgtap.h | 6 | ||||
-rw-r--r-- | src/target/arm720t.c | 2 | ||||
-rw-r--r-- | src/target/arm7tdmi.c | 6 | ||||
-rw-r--r-- | src/target/arm920t.c | 6 | ||||
-rw-r--r-- | src/target/arm926ejs.c | 4 | ||||
-rw-r--r-- | src/target/arm966e.c | 4 | ||||
-rw-r--r-- | src/target/arm9tdmi.c | 8 | ||||
-rw-r--r-- | src/target/arm_adi_v5.c | 4 | ||||
-rw-r--r-- | src/target/arm_jtag.c | 2 | ||||
-rw-r--r-- | src/target/avrt.c | 4 | ||||
-rw-r--r-- | src/target/embeddedice.c | 8 | ||||
-rw-r--r-- | src/target/etb.c | 10 | ||||
-rw-r--r-- | src/target/etm.c | 4 | ||||
-rw-r--r-- | src/target/feroceon.c | 2 | ||||
-rw-r--r-- | src/target/mips_ejtag.c | 8 | ||||
-rw-r--r-- | src/target/xscale.c | 16 | ||||
-rw-r--r-- | src/xsvf/xsvf.c | 6 |
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[] = |