]> git.sur5r.net Git - openocd/commitdiff
scan_field_t -> struct scan_field
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 11:28:03 +0000 (03:28 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:04 +0000 (11:58 -0800)
Remove useless structure typedef.

31 files changed:
src/flash/str9xpec.c
src/jtag/bitq.c
src/jtag/commands.h
src/jtag/core.c
src/jtag/driver.c
src/jtag/jtag.h
src/jtag/minidriver.h
src/jtag/minidummy/minidummy.c
src/jtag/tcl.c
src/jtag/zy1000/zy1000.c
src/pld/virtex2.c
src/svf/svf.c
src/target/arm11.c
src/target/arm11_dbgtap.c
src/target/arm11_dbgtap.h
src/target/arm720t.c
src/target/arm7tdmi.c
src/target/arm920t.c
src/target/arm926ejs.c
src/target/arm966e.c
src/target/arm9tdmi.c
src/target/arm_adi_v5.c
src/target/arm_jtag.c
src/target/avrt.c
src/target/embeddedice.c
src/target/etb.c
src/target/etm.c
src/target/feroceon.c
src/target/mips_ejtag.c
src/target/xscale.c
src/xsvf/xsvf.c

index eabe21f6f644cd6f60c26295764a3fd1c15846e3..83566df88fd72955c8dc1c066f1cd890098ad4cb 100644 (file)
@@ -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;
index cb7b511a285427961c0cd1d1eb97f15ef675d39d..8ddde81396d9dd1dd830ff392adad3e81571cee5 100644 (file)
@@ -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;
index 5a76a8fb0e7f1a9c4d32ab6e219394565adb6ef8..ac440db66f77d0a4db107c5b3e08d087e12c7d17 100644 (file)
@@ -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;
index 9eee5e139bae8d0ffea0457178ee53f3e4036475..48af0406fe74aa954306014f48d7aeb17fafb211 100644 (file)
@@ -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;
index da48fdc23ffe496379718486840766b6fe46b350..de7b789e28cc7a63a49f58064811b3d02cf44292 100644 (file)
@@ -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);
 
index 5224b6cc7778541ee1b7124a54d65ad48a9c56d7..713823a21bbee766610e252244a32dbb0868edad 100644 (file)
@@ -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);
 
index 47400d132f8a211e00baaa4dcf1af5c7eb7e34f0..49931b7b66d50c64b61e432239d10d4beddcb3b0 100644 (file)
 
 #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);
index 4e21cc42668ba6ab271b07d79f305e9c5b9fcf48..af98ec5f24017f254877c109e4fe60d3fbc0ea40 100644 (file)
@@ -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 */
 
index abf875a7962410ece6b94a8014b4fd2d9fa98fa9..04b3ed2f880cafa1f8a800bbb26bfa72736eaf14 100644 (file)
@@ -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;
index 861925887fa4cd732eb281aee8522ec587ad3248..1a926ca96baa06ef896d190bbbc78d5ebe299683 100644 (file)
@@ -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);
index 2d06a0e98f5aaf8ce19702af626c195f11e1bbee..56b4eee74e7939fd377f94a0c7bdc63bce2b2305 100644 (file)
@@ -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;
index 4dea968fd471f25b29e4f54e81a1eddd4093ff51..348145d98e2fe51549d7b71cf4279de8f112d4ed 100644 (file)
@@ -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;
 
index 1dc1834bb4656c3782a5b5f9a16fb92de4f6035f..23185488dc6bdf8362c1d843932f54f6fdd2a3b3 100644 (file)
@@ -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);
index 369576c5076d3cfd0c21eb811624eb7b77dcba4b..6154f34dc00d53a6755fd4529d05cbc0a0f83a23 100644 (file)
@@ -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;
 
index f8a793faf5a7877ed392d35a5dea569f5c22dc52..fb37faa9fa840f4a5b074a84fff7072da9327190 100644 (file)
@@ -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);
 
 /**
index 4e09228bad97422c67b5699d11d5876f98b3744e..01ccf304cfe5227dacbccb4b19c9a2b3f8161605 100644 (file)
@@ -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;
 
index 8bf46807b8ea4a77faa92778f1a7cfd98a4be31b..90e75262755f194be1983b9c239bad93fa0d06cd 100644 (file)
@@ -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)
index 9fe8fc4f66fb5d3e2f8685b20207e0b50fcd121b..ca7728b01781ed8aa00c8bc7abe19fb723a99862 100644 (file)
@@ -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;
index c8120b67425398f3501b5d1129ece1bee49b2795..25c44a0e2888aa9f27962a55de8f58abb984a8ca 100644 (file)
@@ -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;
index b1fea08e6b72a26eaef09701e2626e858bfa110e..d3ae9b2098668c996acdb9ba581709a0d10c5d90 100644 (file)
@@ -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];
index 56ce365240db3e43539b2f236a71b04af1e4c084..d1d4a8de23f0859eb5052a8633e6ba710a866b82 100644 (file)
@@ -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)
index 4a7a37c02022846488460feb4dd0f2ef1d7cce3c..7fc22d0ef61d0afddd00cc9989fa0bdd159d1dc7 100644 (file)
@@ -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;
 
index bcd4faab1a84b435c24cbb39d35c5f7ba9106662..4b5bd3929f7396aeb8d67fae629efe4f27ce7223 100644 (file)
@@ -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;
index bff2418c9475d803c72f82f8043d07f727a85f74..4a1024fef46b774ae0d2e36dfd7cbad2879ef75c 100644 (file)
@@ -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;
index 7b20e12c0f1f40c34937043c4de82c684bc6a8dd..a1eac134140792f07b34ebf904c3d0cac5444d8b 100644 (file)
@@ -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];
index 3ad73977533e859c0acd5703f0c4c20fcb26dec6..1315b71a12439e69bbe92ceb27dfb15113f20ae2 100644 (file)
@@ -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);
 
index 6d34f6c9ca89471226f0259643d1dfa2a1e1e2ff..01a9b714bd280aa6f5290273c9203d7188377c54 100644 (file)
@@ -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);
index e1dc068642f70b75dde83ffe3d6d2820585f3bb9..b157dc3e4ed83a114529a6a9931a22ecc17d4b2a 100644 (file)
@@ -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;
index 021e3ab4b2d49914e34c0c5a6148b563cc1f0113..d23411f47d3858151cb2fdd3274ded7a3b50b0fd 100644 (file)
@@ -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;
 
index c4d22b1d0d2b86f0934a122d48186da560e6329c..3540f6a607c70aec97a16759fa2cb505ecd3fe5a 100644 (file)
@@ -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);
index e1a30e6e0caf37426a5a2834e718acf5da68ccfd..c6daf5fddfb5fd8e1911645840d0ed214be13dde 100644 (file)
@@ -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);