diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 03:19:35 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-13 11:58:04 -0800 |
commit | 42ef503d37b18d907da16d26e99167566d5aabd1 (patch) | |
tree | 9349f3f4e101d334db57ec0f85fb88c93d187ca9 | |
parent | 9f212b01be20da43ba534ad33b20419779c89335 (diff) | |
download | riscv-openocd-42ef503d37b18d907da16d26e99167566d5aabd1.zip riscv-openocd-42ef503d37b18d907da16d26e99167566d5aabd1.tar.gz riscv-openocd-42ef503d37b18d907da16d26e99167566d5aabd1.tar.bz2 |
jtag_tap_t -> struct jtag_tap
Search and destroy the jtag_tap_t typedef. This also cleans up a
layering violation, removing the declaration from types.h.
50 files changed, 151 insertions, 158 deletions
diff --git a/src/flash/avrf.c b/src/flash/avrf.c index 35d31fb..8bbb616 100644 --- a/src/flash/avrf.c +++ b/src/flash/avrf.c @@ -56,17 +56,17 @@ avrf_type_t avft_chips_info[] = {"atmega128", 0x9702, 256, 512, 8, 512}, }; -int avr_jtag_sendinstr(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out); -int avr_jtag_senddat(jtag_tap_t *tap, uint32_t *dr_in, uint32_t dr_out, int len); - -int mcu_write_ir(jtag_tap_t *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti); -int mcu_write_dr(jtag_tap_t *tap, uint8_t *ir_in, uint8_t *ir_out, int dr_len, int rti); -int mcu_write_ir_u8(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti); -int mcu_write_dr_u8(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out, int dr_len, int rti); -int mcu_write_ir_u16(jtag_tap_t *tap, uint16_t *ir_in, uint16_t ir_out, int ir_len, int rti); -int mcu_write_dr_u16(jtag_tap_t *tap, uint16_t *ir_in, uint16_t ir_out, int dr_len, int rti); -int mcu_write_ir_u32(jtag_tap_t *tap, uint32_t *ir_in, uint32_t ir_out, int ir_len, int rti); -int mcu_write_dr_u32(jtag_tap_t *tap, uint32_t *ir_in, uint32_t ir_out, int dr_len, int rti); +int avr_jtag_sendinstr(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out); +int avr_jtag_senddat(struct jtag_tap *tap, uint32_t *dr_in, uint32_t dr_out, int len); + +int mcu_write_ir(struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti); +int mcu_write_dr(struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int dr_len, int rti); +int mcu_write_ir_u8(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti); +int mcu_write_dr_u8(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out, int dr_len, int rti); +int mcu_write_ir_u16(struct jtag_tap *tap, uint16_t *ir_in, uint16_t ir_out, int ir_len, int rti); +int mcu_write_dr_u16(struct jtag_tap *tap, uint16_t *ir_in, uint16_t ir_out, int dr_len, int rti); +int mcu_write_ir_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int ir_len, int rti); +int mcu_write_dr_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int dr_len, int rti); int mcu_execute_queue(void); /* avr program functions */ diff --git a/src/flash/str9xpec.c b/src/flash/str9xpec.c index 4056ba7..eabe21f 100644 --- a/src/flash/str9xpec.c +++ b/src/flash/str9xpec.c @@ -32,7 +32,7 @@ static int str9xpec_erase_area(struct flash_bank_s *bank, int first, int last); static int str9xpec_set_address(struct flash_bank_s *bank, uint8_t sector); static int str9xpec_write_options(struct flash_bank_s *bank); -int str9xpec_set_instr(jtag_tap_t *tap, uint32_t new_instr, tap_state_t end_state) +int str9xpec_set_instr(struct jtag_tap *tap, uint32_t new_instr, tap_state_t end_state) { if (tap == NULL) { return ERROR_TARGET_INVALID; @@ -56,7 +56,7 @@ int str9xpec_set_instr(jtag_tap_t *tap, uint32_t new_instr, tap_state_t end_stat return ERROR_OK; } -static uint8_t str9xpec_isc_status(jtag_tap_t *tap) +static uint8_t str9xpec_isc_status(struct jtag_tap *tap) { scan_field_t field; uint8_t status; @@ -84,7 +84,7 @@ static uint8_t str9xpec_isc_status(jtag_tap_t *tap) static int str9xpec_isc_enable(struct flash_bank_s *bank) { uint8_t status; - jtag_tap_t *tap; + struct jtag_tap *tap; str9xpec_flash_controller_t *str9xpec_info = bank->driver_priv; tap = str9xpec_info->tap; @@ -111,7 +111,7 @@ static int str9xpec_isc_enable(struct flash_bank_s *bank) static int str9xpec_isc_disable(struct flash_bank_s *bank) { uint8_t status; - jtag_tap_t *tap; + struct jtag_tap *tap; str9xpec_flash_controller_t *str9xpec_info = bank->driver_priv; tap = str9xpec_info->tap; @@ -141,7 +141,7 @@ static int str9xpec_read_config(struct flash_bank_s *bank) { scan_field_t field; uint8_t status; - jtag_tap_t *tap; + struct jtag_tap *tap; str9xpec_flash_controller_t *str9xpec_info = bank->driver_priv; @@ -273,7 +273,7 @@ static int str9xpec_blank_check(struct flash_bank_s *bank, int first, int last) { scan_field_t field; uint8_t status; - jtag_tap_t *tap; + struct jtag_tap *tap; int i; uint8_t *buffer = NULL; @@ -362,7 +362,7 @@ static int str9xpec_erase_area(struct flash_bank_s *bank, int first, int last) { scan_field_t field; uint8_t status; - jtag_tap_t *tap; + struct jtag_tap *tap; int i; uint8_t *buffer = NULL; @@ -444,7 +444,7 @@ static int str9xpec_lock_device(struct flash_bank_s *bank) { scan_field_t field; uint8_t status; - jtag_tap_t *tap; + struct jtag_tap *tap; str9xpec_flash_controller_t *str9xpec_info = NULL; str9xpec_info = bank->driver_priv; @@ -539,7 +539,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) { - jtag_tap_t *tap; + struct jtag_tap *tap; scan_field_t field; str9xpec_flash_controller_t *str9xpec_info = bank->driver_priv; @@ -566,7 +566,7 @@ static int str9xpec_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t o uint32_t bytes_written = 0; uint8_t status; uint32_t check_address = offset; - jtag_tap_t *tap; + struct jtag_tap *tap; scan_field_t field; uint8_t *scanbuf; int i; @@ -730,7 +730,7 @@ COMMAND_HANDLER(str9xpec_handle_part_id_command) { scan_field_t field; uint8_t *buffer = NULL; - jtag_tap_t *tap; + struct jtag_tap *tap; uint32_t idcode; str9xpec_flash_controller_t *str9xpec_info = NULL; @@ -837,7 +837,7 @@ static int str9xpec_write_options(struct flash_bank_s *bank) { scan_field_t field; uint8_t status; - jtag_tap_t *tap; + struct jtag_tap *tap; str9xpec_flash_controller_t *str9xpec_info = NULL; str9xpec_info = bank->driver_priv; @@ -1081,9 +1081,9 @@ COMMAND_HANDLER(str9xpec_handle_flash_unlock_command) COMMAND_HANDLER(str9xpec_handle_flash_enable_turbo_command) { - jtag_tap_t *tap0; - jtag_tap_t *tap1; - jtag_tap_t *tap2; + struct jtag_tap *tap0; + struct jtag_tap *tap1; + struct jtag_tap *tap2; str9xpec_flash_controller_t *str9xpec_info = NULL; if (argc < 1) @@ -1130,7 +1130,7 @@ COMMAND_HANDLER(str9xpec_handle_flash_enable_turbo_command) COMMAND_HANDLER(str9xpec_handle_flash_disable_turbo_command) { - jtag_tap_t *tap; + struct jtag_tap *tap; str9xpec_flash_controller_t *str9xpec_info = NULL; if (argc < 1) diff --git a/src/flash/str9xpec.h b/src/flash/str9xpec.h index 376f86c..ff3b6d9 100644 --- a/src/flash/str9xpec.h +++ b/src/flash/str9xpec.h @@ -28,7 +28,7 @@ typedef struct str9xpec_flash_controller_s { - jtag_tap_t *tap; + struct jtag_tap *tap; uint32_t *sector_bits; int chain_pos; int isc_enable; diff --git a/src/helper/types.h b/src/helper/types.h index 50f5fe2..79eac13 100644 --- a/src/helper/types.h +++ b/src/helper/types.h @@ -33,8 +33,6 @@ #include <inttypes.h> #endif -typedef struct jtag_tap_s jtag_tap_t; - #ifdef HAVE_STDBOOL_H #include <stdbool.h> #else /* HAVE_STDBOOL_H */ diff --git a/src/jtag/core.c b/src/jtag/core.c index bbe7425..9eee5e1 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -78,7 +78,7 @@ static int jtag_srst = -1; /** * List all TAPs that have been created. */ -static jtag_tap_t *__jtag_all_taps = NULL; +static struct jtag_tap *__jtag_all_taps = NULL; /** * The number of TAPs in the __jtag_all_taps list, used to track the * assigned chain position to new TAPs @@ -164,7 +164,7 @@ void jtag_poll_set_enabled(bool value) /************/ -jtag_tap_t *jtag_all_taps(void) +struct jtag_tap *jtag_all_taps(void) { return __jtag_all_taps; }; @@ -176,7 +176,7 @@ unsigned jtag_tap_count(void) unsigned jtag_tap_count_enabled(void) { - jtag_tap_t *t = jtag_all_taps(); + struct jtag_tap *t = jtag_all_taps(); unsigned n = 0; while (t) { @@ -188,20 +188,20 @@ unsigned jtag_tap_count_enabled(void) } /// Append a new TAP to the chain of all taps. -void jtag_tap_add(struct jtag_tap_s *t) +void jtag_tap_add(struct jtag_tap *t) { t->abs_chain_position = jtag_num_taps++; - jtag_tap_t **tap = &__jtag_all_taps; + struct jtag_tap **tap = &__jtag_all_taps; while (*tap != NULL) tap = &(*tap)->next_tap; *tap = t; } /* returns a pointer to the n-th device in the scan chain */ -static inline jtag_tap_t *jtag_tap_by_position(unsigned n) +static inline struct jtag_tap *jtag_tap_by_position(unsigned n) { - jtag_tap_t *t = jtag_all_taps(); + struct jtag_tap *t = jtag_all_taps(); while (t && n-- > 0) t = t->next_tap; @@ -209,10 +209,10 @@ static inline jtag_tap_t *jtag_tap_by_position(unsigned n) return t; } -jtag_tap_t *jtag_tap_by_string(const char *s) +struct jtag_tap *jtag_tap_by_string(const char *s) { /* try by name first */ - jtag_tap_t *t = jtag_all_taps(); + struct jtag_tap *t = jtag_all_taps(); while (t) { @@ -238,10 +238,10 @@ jtag_tap_t *jtag_tap_by_string(const char *s) return t; } -jtag_tap_t *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *o) +struct jtag_tap *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *o) { const char *cp = Jim_GetString(o, NULL); - jtag_tap_t *t = cp ? jtag_tap_by_string(cp) : NULL; + struct jtag_tap *t = cp ? jtag_tap_by_string(cp) : NULL; if (NULL == cp) cp = "(unknown)"; if (NULL == t) @@ -249,7 +249,7 @@ jtag_tap_t *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *o) return t; } -jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p) +struct jtag_tap* jtag_tap_next_enabled(struct jtag_tap* p) { p = p ? p->next_tap : jtag_all_taps(); while (p) @@ -261,7 +261,7 @@ jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p) return NULL; } -const char *jtag_tap_name(const jtag_tap_t *tap) +const char *jtag_tap_name(const struct jtag_tap *tap) { return (tap == NULL) ? "(unknown)" : tap->dotted_name; } @@ -496,7 +496,7 @@ void jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields, jtag_set_error(retval); } -void jtag_add_dr_out(jtag_tap_t* tap, +void jtag_add_dr_out(struct jtag_tap* tap, int num_fields, const int* num_bits, const uint32_t* value, tap_state_t end_state) { @@ -856,7 +856,7 @@ int jtag_execute_queue(void) static int jtag_reset_callback(enum jtag_event event, void *priv) { - jtag_tap_t *tap = priv; + struct jtag_tap *tap = priv; if (event == JTAG_TRST_ASSERTED) { @@ -989,7 +989,7 @@ static bool jtag_examine_chain_end(uint8_t *idcodes, unsigned count, unsigned ma return triggered; } -static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap) +static bool jtag_examine_chain_match_tap(const struct jtag_tap *tap) { /* ignore expected BYPASS codes; warn otherwise */ if (0 == tap->expected_ids_cnt && !tap->idcode) @@ -1044,7 +1044,7 @@ static int jtag_examine_chain(void) return ERROR_JTAG_INIT_FAILED; /* point at the 1st tap */ - jtag_tap_t *tap = jtag_tap_next_enabled(NULL); + struct jtag_tap *tap = jtag_tap_next_enabled(NULL); if (!tap) autoprobe = true; @@ -1168,7 +1168,7 @@ static int jtag_examine_chain(void) */ static int jtag_validate_ircapture(void) { - jtag_tap_t *tap; + struct jtag_tap *tap; int total_ir_length = 0; uint8_t *ir_test = NULL; scan_field_t field; @@ -1280,7 +1280,7 @@ done: } -void jtag_tap_init(jtag_tap_t *tap) +void jtag_tap_init(struct jtag_tap *tap) { unsigned ir_len_bits; unsigned ir_len_bytes; @@ -1315,7 +1315,7 @@ void jtag_tap_init(jtag_tap_t *tap) jtag_tap_add(tap); } -void jtag_tap_free(jtag_tap_t *tap) +void jtag_tap_free(struct jtag_tap *tap) { jtag_unregister_event_callback(&jtag_reset_callback, tap); @@ -1371,7 +1371,7 @@ int jtag_interface_init(struct command_context_s *cmd_ctx) int jtag_init_inner(struct command_context_s *cmd_ctx) { - jtag_tap_t *tap; + struct jtag_tap *tap; int retval; bool issue_setup = true; diff --git a/src/jtag/driver.c b/src/jtag/driver.c index 3bce5d5..da48fdc 100644 --- a/src/jtag/driver.c +++ b/src/jtag/driver.c @@ -96,7 +96,7 @@ int interface_jtag_add_ir_scan(int in_num_fields, const scan_field_t *in_fields, /* loop over all enabled TAPs */ - for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) + for (struct jtag_tap * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) { /* search the input field list for fields for the current TAP */ @@ -182,7 +182,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields, size_t bypass_devices = 0; - for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) + for (struct jtag_tap * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) { if (tap->bypass) bypass_devices++; @@ -207,7 +207,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields, /* loop over all enabled TAPs */ - for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) + for (struct jtag_tap * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) { /* if TAP is not bypassed insert matching input fields */ @@ -261,7 +261,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields, * The bypass status of TAPs is set by jtag_add_ir_scan(). * */ -void interface_jtag_add_dr_out(jtag_tap_t *target_tap, +void interface_jtag_add_dr_out(struct jtag_tap *target_tap, int in_num_fields, const int *num_bits, const uint32_t *value, @@ -271,7 +271,7 @@ void interface_jtag_add_dr_out(jtag_tap_t *target_tap, size_t bypass_devices = 0; - for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) + for (struct jtag_tap * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) { if (tap->bypass) bypass_devices++; @@ -299,7 +299,7 @@ void interface_jtag_add_dr_out(jtag_tap_t *target_tap, /* loop over all enabled TAPs */ - for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) + for (struct jtag_tap * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap)) { /* if TAP is not bypassed insert matching input fields */ diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h index 1dfefde..5224b6c 100644 --- a/src/jtag/jtag.h +++ b/src/jtag/jtag.h @@ -26,7 +26,6 @@ #include "binarybuffer.h" #include "log.h" - #ifdef _DEBUG_JTAG_IO_ #define DEBUG_JTAG_IO(expr ...) \ do { if (1) LOG_DEBUG(expr); } while (0) @@ -123,7 +122,7 @@ extern tap_state_t cmd_queue_cur_state; typedef struct scan_field_s { /// A pointer to the tap structure to which this field refers. - jtag_tap_t* tap; + struct jtag_tap* tap; /// The number of bits this field specifies (up to 32) int num_bits; @@ -147,11 +146,7 @@ typedef struct scan_field_s typedef struct jtag_tap_event_action_s jtag_tap_event_action_t; -/* this is really: typedef jtag_tap_t */ -/* But - the typedef is done in "types.h" */ -/* due to "forward declaration reasons" */ -struct jtag_tap_s -{ +struct jtag_tap { const char* chip; const char* tapname; const char* dotted_name; @@ -182,17 +177,17 @@ struct jtag_tap_s jtag_tap_event_action_t *event_action; - jtag_tap_t* next_tap; + struct jtag_tap* next_tap; }; -void jtag_tap_init(jtag_tap_t *tap); -void jtag_tap_free(jtag_tap_t *tap); +void jtag_tap_init(struct jtag_tap *tap); +void jtag_tap_free(struct jtag_tap *tap); -jtag_tap_t* jtag_all_taps(void); -const char *jtag_tap_name(const jtag_tap_t *tap); -jtag_tap_t* jtag_tap_by_string(const char* dotted_name); -jtag_tap_t* jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj* obj); -jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p); +struct jtag_tap* jtag_all_taps(void); +const char *jtag_tap_name(const struct jtag_tap *tap); +struct jtag_tap* jtag_tap_by_string(const char* dotted_name); +struct jtag_tap* jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj* obj); +struct jtag_tap* jtag_tap_next_enabled(struct jtag_tap* p); unsigned jtag_tap_count_enabled(void); unsigned jtag_tap_count(void); @@ -702,7 +697,7 @@ void jtag_sleep(uint32_t us); * There is no jtag_add_dr_outin() version of this fn that also allows * clocking data back in. Patches gladly accepted! */ -void jtag_add_dr_out(jtag_tap_t* tap, +void jtag_add_dr_out(struct jtag_tap* tap, int num_fields, const int* num_bits, const uint32_t* value, tap_state_t end_state); diff --git a/src/jtag/minidriver.h b/src/jtag/minidriver.h index 57d1d6e..47400d1 100644 --- a/src/jtag/minidriver.h +++ b/src/jtag/minidriver.h @@ -81,7 +81,7 @@ static inline void interface_jtag_add_scan_check_alloc(scan_field_t *field) field->in_value = (uint8_t *)cmd_queue_alloc(num_bytes); } -void interface_jtag_add_dr_out(jtag_tap_t* tap, +void interface_jtag_add_dr_out(struct jtag_tap* tap, int num_fields, const int* num_bits, const uint32_t* value, tap_state_t end_state); diff --git a/src/jtag/minidummy/jtag_minidriver.h b/src/jtag/minidummy/jtag_minidriver.h index 26b212b..0435737 100644 --- a/src/jtag/minidummy/jtag_minidriver.h +++ b/src/jtag/minidummy/jtag_minidriver.h @@ -20,7 +20,7 @@ -static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap, +static __inline__ void interface_jtag_add_dr_out_core(struct jtag_tap *target_tap, int num_fields, const int *num_bits, const uint32_t *value, @@ -29,7 +29,7 @@ static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap, /* synchronously do the operation here */ } -static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap, +static __inline__ void interface_jtag_add_dr_out(struct jtag_tap *target_tap, int num_fields, const int *num_bits, const uint32_t *value, diff --git a/src/jtag/minidummy/minidummy.c b/src/jtag/minidummy/minidummy.c index 2cab0f5..4e21cc4 100644 --- a/src/jtag/minidummy/minidummy.c +++ b/src/jtag/minidummy/minidummy.c @@ -172,7 +172,7 @@ int interface_jtag_add_pathmove(int num_states, const tap_state_t *path) -void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int little, int count) +void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, uint8_t *buffer, int little, int count) { int i; for (i = 0; i < count; i++) diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 923542f..abf875a 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -61,7 +61,7 @@ static Jim_Nvp nvp_config_opts[] = { { .name = NULL, .value = -1 } }; -static int jtag_tap_configure_cmd(Jim_GetOptInfo *goi, jtag_tap_t * tap) +static int jtag_tap_configure_cmd(Jim_GetOptInfo *goi, struct jtag_tap * tap) { Jim_Nvp *n; Jim_Obj *o; @@ -165,7 +165,7 @@ static int is_bad_irval(int ir_length, jim_wide w) static int jim_newtap_cmd(Jim_GetOptInfo *goi) { - jtag_tap_t *pTap; + struct jtag_tap *pTap; jim_wide w; int x; int e; @@ -187,7 +187,7 @@ static int jim_newtap_cmd(Jim_GetOptInfo *goi) { .name = NULL , .value = -1 }, }; - pTap = calloc(1, sizeof(jtag_tap_t)); + pTap = calloc(1, sizeof(struct jtag_tap)); if (!pTap) { Jim_SetResult_sprintf(goi->interp, "no memory"); return JIM_ERR; @@ -335,7 +335,7 @@ static int jim_newtap_cmd(Jim_GetOptInfo *goi) return JIM_ERR; } -static void jtag_tap_handle_event(jtag_tap_t *tap, enum jtag_event e) +static void jtag_tap_handle_event(struct jtag_tap *tap, enum jtag_event e) { jtag_tap_event_action_t * jteap; @@ -459,7 +459,7 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } { - jtag_tap_t *t; + struct jtag_tap *t; t = jtag_tap_by_jim_obj(goi.interp, goi.argv[0]); if (t == NULL) @@ -511,7 +511,7 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } { - jtag_tap_t *t; + struct jtag_tap *t; Jim_GetOpt_Obj(&goi, &o); t = jtag_tap_by_jim_obj(goi.interp, o); @@ -532,7 +532,7 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } { - jtag_tap_t *t; + struct jtag_tap *t; Jim_GetOpt_Obj(&goi, &o); t = jtag_tap_by_jim_obj(goi.interp, o); @@ -552,7 +552,7 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } Jim_SetResult(goi.interp, Jim_NewListObj(goi.interp, NULL, 0)); { - jtag_tap_t *tap; + struct jtag_tap *tap; for (tap = jtag_all_taps(); tap; tap = tap->next_tap) { Jim_ListAppendElement(goi.interp, @@ -572,7 +572,7 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv) void jtag_notify_event(enum jtag_event event) { - jtag_tap_t *tap; + struct jtag_tap *tap; for (tap = jtag_all_taps(); tap; tap = tap->next_tap) jtag_tap_handle_event(tap, event); @@ -664,7 +664,7 @@ COMMAND_HANDLER(handle_interface_command) COMMAND_HANDLER(handle_scan_chain_command) { - jtag_tap_t *tap; + struct jtag_tap *tap; tap = jtag_all_taps(); command_print(cmd_ctx, " TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr "); @@ -1079,7 +1079,7 @@ COMMAND_HANDLER(handle_irscan_command) { int i; scan_field_t *fields; - jtag_tap_t *tap; + struct jtag_tap *tap; tap_state_t endstate; if ((argc < 2) || (argc % 2)) @@ -1163,7 +1163,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args int num_fields; int field_count = 0; int i, e; - jtag_tap_t *tap; + struct jtag_tap *tap; tap_state_t endstate; /* args[1] = device diff --git a/src/jtag/zy1000/jtag_minidriver.h b/src/jtag/zy1000/jtag_minidriver.h index e755159..0e97913 100644 --- a/src/jtag/zy1000/jtag_minidriver.h +++ b/src/jtag/zy1000/jtag_minidriver.h @@ -148,7 +148,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta -static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap, +static __inline__ void interface_jtag_add_dr_out_core(struct jtag_tap *target_tap, int num_fields, const int *num_bits, const uint32_t *value, @@ -156,7 +156,7 @@ static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap, { enum tap_state pause_state = TAP_DRSHIFT; - jtag_tap_t *tap, *nextTap; + struct jtag_tap *tap, *nextTap; for (tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap = nextTap) { nextTap = jtag_tap_next_enabled(tap); @@ -180,7 +180,7 @@ static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap, } } -static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap, +static __inline__ void interface_jtag_add_dr_out(struct jtag_tap *target_tap, int num_fields, const int *num_bits, const uint32_t *value, diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index f45bff5..8619258 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -537,7 +537,7 @@ int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_s int j; int scan_size = 0; - jtag_tap_t *tap, *nextTap; + struct jtag_tap *tap, *nextTap; for (tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap = nextTap) { nextTap = jtag_tap_next_enabled(tap); @@ -601,7 +601,7 @@ int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_s { int j; - jtag_tap_t *tap, *nextTap; + struct jtag_tap *tap, *nextTap; for (tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap = nextTap) { nextTap = jtag_tap_next_enabled(tap); @@ -759,7 +759,7 @@ int interface_jtag_add_pathmove(int num_states, const tap_state_t *path) -void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int little, int count) +void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, uint8_t *buffer, int little, int count) { // static int const reg_addr = 0x5; tap_state_t end_state = jtag_get_end_state(); diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c index 7e422fb..2d06a0e 100644 --- a/src/pld/virtex2.c +++ b/src/pld/virtex2.c @@ -26,7 +26,7 @@ #include "pld.h" -static int virtex2_set_instr(jtag_tap_t *tap, uint32_t new_instr) +static int virtex2_set_instr(struct jtag_tap *tap, uint32_t new_instr) { if (tap == NULL) return ERROR_FAIL; @@ -209,7 +209,7 @@ COMMAND_HANDLER(virtex2_handle_read_stat_command) PLD_DEVICE_COMMAND_HANDLER(virtex2_pld_device_command) { - jtag_tap_t *tap; + struct jtag_tap *tap; virtex2_pld_device_t *virtex2_info; diff --git a/src/pld/virtex2.h b/src/pld/virtex2.h index 65ad74a..2714dd7 100644 --- a/src/pld/virtex2.h +++ b/src/pld/virtex2.h @@ -24,7 +24,7 @@ typedef struct virtex2_pld_device_s { - jtag_tap_t *tap; + struct jtag_tap *tap; } virtex2_pld_device_t; #endif /* VIRTEX2_H */ diff --git a/src/svf/svf.c b/src/svf/svf.c index 8f2ee80..4dea968 100644 --- a/src/svf/svf.c +++ b/src/svf/svf.c @@ -216,7 +216,7 @@ static char *svf_command_buffer = NULL; static int svf_command_buffer_size = 0; static int svf_line_number = 1; -static jtag_tap_t *tap = NULL; +static struct jtag_tap *tap = NULL; #define SVF_MAX_BUFFER_SIZE_TO_COMMIT (4 * 1024) static uint8_t *svf_tdi_buffer = NULL, *svf_tdo_buffer = NULL, *svf_mask_buffer = NULL; diff --git a/src/target/arm11.c b/src/target/arm11.c index 5b11f8e..1dc1834 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -2066,7 +2066,7 @@ static const uint32_t arm11_coproc_instruction_limits[] = static arm11_common_t * arm11_find_target(const char * arg) { - jtag_tap_t * tap; + struct jtag_tap * tap; target_t * t; tap = jtag_tap_by_string(arg); diff --git a/src/target/arm11_dbgtap.c b/src/target/arm11_dbgtap.c index fc7a55c..369576c 100644 --- a/src/target/arm11_dbgtap.c +++ b/src/target/arm11_dbgtap.c @@ -100,7 +100,7 @@ void arm11_setup_field(arm11_common_t * arm11, int num_bits, void * out_data, vo */ void arm11_add_IR(arm11_common_t * arm11, uint8_t instr, tap_state_t state) { - jtag_tap_t *tap; + struct jtag_tap *tap; tap = arm11->target->tap; if (buf_get_u32(tap->cur_instr, 0, 5) == instr) diff --git a/src/target/arm720t.c b/src/target/arm720t.c index af326bf..4e09228 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -377,7 +377,7 @@ static int arm720t_init_target(struct command_context_s *cmd_ctx, struct target_ } static int arm720t_init_arch_info(target_t *target, - arm720t_common_t *arm720t, jtag_tap_t *tap) + arm720t_common_t *arm720t, struct jtag_tap *tap) { arm7tdmi_common_t *arm7tdmi = &arm720t->arm7tdmi_common; arm7_9_common_t *arm7_9 = &arm7tdmi->arm7_9_common; diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 6a56417..96575d5 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -2611,7 +2611,7 @@ static int arm7_9_dcc_completion(struct target_s *target, uint32_t exit_point, i embeddedice_reg_t *ice_reg = arm7_9->eice_cache->reg_list[EICE_COMMS_DATA].arch_info; uint8_t reg_addr = ice_reg->addr & 0x1f; - jtag_tap_t *tap; + struct jtag_tap *tap; tap = ice_reg->jtag_info->tap; embeddedice_write_dcc(tap, reg_addr, buffer, little, count-2); diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index f58ffe2..8bf4680 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -691,7 +691,7 @@ int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *tar return ERROR_OK; } -int arm7tdmi_init_arch_info(target_t *target, arm7tdmi_common_t *arm7tdmi, jtag_tap_t *tap) +int arm7tdmi_init_arch_info(target_t *target, arm7tdmi_common_t *arm7tdmi, struct jtag_tap *tap) { struct arm7_9_common_s *arm7_9 = &arm7tdmi->arm7_9_common; diff --git a/src/target/arm7tdmi.h b/src/target/arm7tdmi.h index f69ba49..da0f772 100644 --- a/src/target/arm7tdmi.h +++ b/src/target/arm7tdmi.h @@ -33,7 +33,7 @@ typedef struct arm7tdmi_common_s arm7_9_common_t arm7_9_common; } arm7tdmi_common_t; -int arm7tdmi_init_arch_info(target_t *target, arm7tdmi_common_t *arm7tdmi, jtag_tap_t *tap); +int arm7tdmi_init_arch_info(target_t *target, arm7tdmi_common_t *arm7tdmi, struct jtag_tap *tap); int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target); int arm7tdmi_examine(struct target_s *target); diff --git a/src/target/arm920t.c b/src/target/arm920t.c index 81f5c6a..9fe8fc4 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -620,7 +620,7 @@ int arm920t_soft_reset_halt(struct target_s *target) return ERROR_OK; } -int arm920t_init_arch_info(target_t *target, arm920t_common_t *arm920t, jtag_tap_t *tap) +int arm920t_init_arch_info(target_t *target, arm920t_common_t *arm920t, struct jtag_tap *tap) { arm9tdmi_common_t *arm9tdmi = &arm920t->arm9tdmi_common; arm7_9_common_t *arm7_9 = &arm9tdmi->arm7_9_common; diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 77405a8..c8120b6 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -667,7 +667,7 @@ static int arm926ejs_read_phys_memory(struct target_s *target, } int arm926ejs_init_arch_info(target_t *target, arm926ejs_common_t *arm926ejs, - jtag_tap_t *tap) + struct jtag_tap *tap) { arm9tdmi_common_t *arm9tdmi = &arm926ejs->arm9tdmi_common; arm7_9_common_t *arm7_9 = &arm9tdmi->arm7_9_common; diff --git a/src/target/arm926ejs.h b/src/target/arm926ejs.h index 0712c53..f0df091 100644 --- a/src/target/arm926ejs.h +++ b/src/target/arm926ejs.h @@ -47,7 +47,7 @@ target_to_arm926(struct target_s *target) int arm926ejs_init_arch_info(target_t *target, - arm926ejs_common_t *arm926ejs, jtag_tap_t *tap); + arm926ejs_common_t *arm926ejs, struct jtag_tap *tap); int arm926ejs_register_commands(struct command_context_s *cmd_ctx); int arm926ejs_arch_state(struct target_s *target); int arm926ejs_write_memory(struct target_s *target, diff --git a/src/target/arm966e.c b/src/target/arm966e.c index 62ccaa8..b1fea08 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -32,7 +32,7 @@ #define _DEBUG_INSTRUCTION_EXECUTION_ #endif -int arm966e_init_arch_info(target_t *target, arm966e_common_t *arm966e, jtag_tap_t *tap) +int arm966e_init_arch_info(target_t *target, arm966e_common_t *arm966e, struct jtag_tap *tap) { arm9tdmi_common_t *arm9tdmi = &arm966e->arm9tdmi_common; arm7_9_common_t *arm7_9 = &arm9tdmi->arm7_9_common; diff --git a/src/target/arm966e.h b/src/target/arm966e.h index 8d0ee50..e311659 100644 --- a/src/target/arm966e.h +++ b/src/target/arm966e.h @@ -42,7 +42,7 @@ target_to_arm966(struct target_s *target) } int arm966e_init_arch_info(target_t *target, - arm966e_common_t *arm966e, jtag_tap_t *tap); + arm966e_common_t *arm966e, struct jtag_tap *tap); int arm966e_register_commands(struct command_context_s *cmd_ctx); int arm966e_write_cp15(target_t *target, int reg_addr, uint32_t value); diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 416fe79..56ce365 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -786,7 +786,7 @@ int arm9tdmi_init_target(struct command_context_s *cmd_ctx, return ERROR_OK; } -int arm9tdmi_init_arch_info(target_t *target, arm9tdmi_common_t *arm9tdmi, jtag_tap_t *tap) +int arm9tdmi_init_arch_info(target_t *target, arm9tdmi_common_t *arm9tdmi, struct jtag_tap *tap) { armv4_5_common_t *armv4_5; arm7_9_common_t *arm7_9; diff --git a/src/target/arm9tdmi.h b/src/target/arm9tdmi.h index c098d82..775d475 100644 --- a/src/target/arm9tdmi.h +++ b/src/target/arm9tdmi.h @@ -55,7 +55,7 @@ int arm9tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target); int arm9tdmi_examine(struct target_s *target); int arm9tdmi_init_arch_info(target_t *target, - arm9tdmi_common_t *arm9tdmi, jtag_tap_t *tap); + arm9tdmi_common_t *arm9tdmi, struct jtag_tap *tap); int arm9tdmi_register_commands(struct command_context_s *cmd_ctx); int arm9tdmi_clock_out(arm_jtag_t *jtag_info, diff --git a/src/target/arm_jtag.c b/src/target/arm_jtag.c index d975d9d..bcd4faa 100644 --- a/src/target/arm_jtag.c +++ b/src/target/arm_jtag.c @@ -33,7 +33,7 @@ int arm_jtag_set_instr(arm_jtag_t *jtag_info, uint32_t new_instr, void *no_verify_capture) { - jtag_tap_t *tap; + struct jtag_tap *tap; tap = jtag_info->tap; if (tap == NULL) return ERROR_FAIL; diff --git a/src/target/arm_jtag.h b/src/target/arm_jtag.h index c7d12cb..5b882c6 100644 --- a/src/target/arm_jtag.h +++ b/src/target/arm_jtag.h @@ -27,7 +27,7 @@ typedef struct arm_jtag_s { - jtag_tap_t *tap; + struct jtag_tap *tap; uint32_t scann_size; uint32_t scann_instr; diff --git a/src/target/avrt.c b/src/target/avrt.c index 98433cf..bff2418 100644 --- a/src/target/avrt.c +++ b/src/target/avrt.c @@ -46,17 +46,17 @@ int avr_deassert_reset(target_t *target); int avr_soft_reset_halt(struct target_s *target); /* IR and DR functions */ -int avr_jtag_sendinstr(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out); -int avr_jtag_senddat(jtag_tap_t *tap, uint32_t *dr_in, uint32_t dr_out, int len); - -int mcu_write_ir(jtag_tap_t *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti); -int mcu_write_dr(jtag_tap_t *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_len, int rti); -int mcu_write_ir_u8(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti); -int mcu_write_dr_u8(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out, int dr_len, int rti); -int mcu_write_ir_u16(jtag_tap_t *tap, uint16_t *ir_in, uint16_t ir_out, int ir_len, int rti); -int mcu_write_dr_u16(jtag_tap_t *tap, uint16_t *ir_in, uint16_t ir_out, int dr_len, int rti); -int mcu_write_ir_u32(jtag_tap_t *tap, uint32_t *ir_in, uint32_t ir_out, int ir_len, int rti); -int mcu_write_dr_u32(jtag_tap_t *tap, uint32_t *ir_in, uint32_t ir_out, int dr_len, int rti); +int avr_jtag_sendinstr(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out); +int avr_jtag_senddat(struct jtag_tap *tap, uint32_t *dr_in, uint32_t dr_out, int len); + +int mcu_write_ir(struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti); +int mcu_write_dr(struct jtag_tap *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_len, int rti); +int mcu_write_ir_u8(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti); +int mcu_write_dr_u8(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out, int dr_len, int rti); +int mcu_write_ir_u16(struct jtag_tap *tap, uint16_t *ir_in, uint16_t ir_out, int ir_len, int rti); +int mcu_write_dr_u16(struct jtag_tap *tap, uint16_t *ir_in, uint16_t ir_out, int dr_len, int rti); +int mcu_write_ir_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int ir_len, int rti); +int mcu_write_dr_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int dr_len, int rti); int mcu_execute_queue(void); target_type_t avr_target = @@ -175,18 +175,18 @@ int avr_soft_reset_halt(struct target_s *target) return ERROR_OK; } -int avr_jtag_senddat(jtag_tap_t *tap, uint32_t* dr_in, uint32_t dr_out, int len) +int avr_jtag_senddat(struct jtag_tap *tap, uint32_t* dr_in, uint32_t dr_out, int len) { return mcu_write_dr_u32(tap, dr_in, dr_out, len, 1); } -int avr_jtag_sendinstr(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out) +int avr_jtag_sendinstr(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out) { return mcu_write_ir_u8(tap, ir_in, ir_out, AVR_JTAG_INS_LEN, 1); } /* IR and DR functions */ -int mcu_write_ir(jtag_tap_t *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti) +int mcu_write_ir(struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti) { if (NULL == tap) { @@ -212,7 +212,7 @@ int mcu_write_ir(jtag_tap_t *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, i return ERROR_OK; } -int mcu_write_dr(jtag_tap_t *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_len, int rti) +int mcu_write_dr(struct jtag_tap *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_len, int rti) { if (NULL == tap) { @@ -233,7 +233,7 @@ int mcu_write_dr(jtag_tap_t *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_len, i return ERROR_OK; } -int mcu_write_ir_u8(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti) +int mcu_write_ir_u8(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti) { if (ir_len > 8) { @@ -246,7 +246,7 @@ int mcu_write_ir_u8(jtag_tap_t *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, return ERROR_OK; } -int mcu_write_dr_u8(jtag_tap_t *tap, uint8_t *dr_in, uint8_t dr_out, int dr_len, int rti) +int mcu_write_dr_u8(struct jtag_tap *tap, uint8_t *dr_in, uint8_t dr_out, int dr_len, int rti) { if (dr_len > 8) { @@ -259,7 +259,7 @@ int mcu_write_dr_u8(jtag_tap_t *tap, uint8_t *dr_in, uint8_t dr_out, int dr_len, return ERROR_OK; } -int mcu_write_ir_u16(jtag_tap_t *tap, uint16_t *ir_in, uint16_t ir_out, int ir_len, int rti) +int mcu_write_ir_u16(struct jtag_tap *tap, uint16_t *ir_in, uint16_t ir_out, int ir_len, int rti) { if (ir_len > 16) { @@ -272,7 +272,7 @@ int mcu_write_ir_u16(jtag_tap_t *tap, uint16_t *ir_in, uint16_t ir_out, int ir_l return ERROR_OK; } -int mcu_write_dr_u16(jtag_tap_t *tap, uint16_t *dr_in, uint16_t dr_out, int dr_len, int rti) +int mcu_write_dr_u16(struct jtag_tap *tap, uint16_t *dr_in, uint16_t dr_out, int dr_len, int rti) { if (dr_len > 16) { @@ -285,7 +285,7 @@ int mcu_write_dr_u16(jtag_tap_t *tap, uint16_t *dr_in, uint16_t dr_out, int dr_l return ERROR_OK; } -int mcu_write_ir_u32(jtag_tap_t *tap, uint32_t *ir_in, uint32_t ir_out, int ir_len, int rti) +int mcu_write_ir_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int ir_len, int rti) { if (ir_len > 32) { @@ -298,7 +298,7 @@ int mcu_write_ir_u32(jtag_tap_t *tap, uint32_t *ir_in, uint32_t ir_out, int ir_l return ERROR_OK; } -int mcu_write_dr_u32(jtag_tap_t *tap, uint32_t *dr_in, uint32_t dr_out, int dr_len, int rti) +int mcu_write_dr_u32(struct jtag_tap *tap, uint32_t *dr_in, uint32_t dr_out, int dr_len, int rti) { if (dr_len > 32) { diff --git a/src/target/avrt.h b/src/target/avrt.h index 02bb005..37ea8e3d 100644 --- a/src/target/avrt.h +++ b/src/target/avrt.h @@ -24,7 +24,7 @@ typedef struct mcu_jtag_s { - jtag_tap_t *tap; + struct jtag_tap *tap; } mcu_jtag_t; typedef struct avr_common_s diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index 3ce861c..2a3cbad 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -1451,7 +1451,7 @@ static int cortex_a8_init_target(struct command_context_s *cmd_ctx, } int cortex_a8_init_arch_info(target_t *target, - cortex_a8_common_t *cortex_a8, jtag_tap_t *tap) + cortex_a8_common_t *cortex_a8, struct jtag_tap *tap) { armv4_5_common_t *armv4_5; armv7a_common_t *armv7a; diff --git a/src/target/cortex_a8.h b/src/target/cortex_a8.h index 869a6f5..39d4e77 100644 --- a/src/target/cortex_a8.h +++ b/src/target/cortex_a8.h @@ -144,6 +144,6 @@ target_to_cortex_a8(struct target_s *target) } int cortex_a8_init_arch_info(target_t *target, - cortex_a8_common_t *cortex_a8, jtag_tap_t *tap); + cortex_a8_common_t *cortex_a8, struct jtag_tap *tap); #endif /* CORTEX_A8_H */ diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 86469c4..d617817 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1708,7 +1708,7 @@ static int cortex_m3_handle_target_request(void *priv) } static int cortex_m3_init_arch_info(target_t *target, - cortex_m3_common_t *cortex_m3, jtag_tap_t *tap) + cortex_m3_common_t *cortex_m3, struct jtag_tap *tap) { int retval; struct armv7m_common_s *armv7m = &cortex_m3->armv7m; diff --git a/src/target/embeddedice.c b/src/target/embeddedice.c index 4801cf7..7b20e12 100644 --- a/src/target/embeddedice.c +++ b/src/target/embeddedice.c @@ -622,7 +622,7 @@ int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, uint32_t timeout) /** * This is an inner loop of the open loop DCC write of data to target */ -void embeddedice_write_dcc(jtag_tap_t *tap, +void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, uint8_t *buffer, int little, int count) { int i; diff --git a/src/target/embeddedice.h b/src/target/embeddedice.h index b1ba989..c27a1b5 100644 --- a/src/target/embeddedice.h +++ b/src/target/embeddedice.h @@ -116,7 +116,7 @@ int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, uint32_t timeout); /* If many embeddedice_write_reg() follow eachother, then the >1 invocations can be this faster version of * embeddedice_write_reg */ -static __inline__ void embeddedice_write_reg_inner(jtag_tap_t *tap, int reg_addr, uint32_t value) +static __inline__ void embeddedice_write_reg_inner(struct jtag_tap *tap, int reg_addr, uint32_t value) { static const int embeddedice_num_bits[]={32,5,1}; uint32_t values[3]; @@ -132,6 +132,6 @@ static __inline__ void embeddedice_write_reg_inner(jtag_tap_t *tap, int reg_addr jtag_get_end_state()); } -void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, uint8_t *buffer, int little, int count); +void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, uint8_t *buffer, int little, int count); #endif /* EMBEDDED_ICE_H */ diff --git a/src/target/etb.c b/src/target/etb.c index c0c485f..3ad7397 100644 --- a/src/target/etb.c +++ b/src/target/etb.c @@ -44,7 +44,7 @@ static int etb_get_reg(reg_t *reg); static int etb_set_instr(etb_t *etb, uint32_t new_instr) { - jtag_tap_t *tap; + struct jtag_tap *tap; tap = etb->tap; if (tap == NULL) @@ -352,7 +352,7 @@ static int etb_write_reg(reg_t *reg, uint32_t value) COMMAND_HANDLER(handle_etb_config_command) { target_t *target; - jtag_tap_t *tap; + struct jtag_tap *tap; struct arm *arm; if (argc != 2) diff --git a/src/target/etb.h b/src/target/etb.h index da9c9b3..6700ecb 100644 --- a/src/target/etb.h +++ b/src/target/etb.h @@ -37,7 +37,7 @@ enum typedef struct etb_s { etm_context_t *etm_ctx; - jtag_tap_t *tap; + struct jtag_tap *tap; uint32_t cur_scan_chain; reg_cache_t *reg_cache; diff --git a/src/target/fa526.c b/src/target/fa526.c index 1a204b1..4592934 100644 --- a/src/target/fa526.c +++ b/src/target/fa526.c @@ -256,7 +256,7 @@ static void fa526_branch_resume_thumb(target_t *target) } static int fa526_init_arch_info_2(target_t *target, - arm9tdmi_common_t *arm9tdmi, jtag_tap_t *tap) + arm9tdmi_common_t *arm9tdmi, struct jtag_tap *tap) { arm7_9_common_t *arm7_9; @@ -315,7 +315,7 @@ static int fa526_init_arch_info_2(target_t *target, } static int fa526_init_arch_info(target_t *target, - arm920t_common_t *arm920t, jtag_tap_t *tap) + arm920t_common_t *arm920t, struct jtag_tap *tap) { arm9tdmi_common_t *arm9tdmi = &arm920t->arm9tdmi_common; arm7_9_common_t *arm7_9 = &arm9tdmi->arm7_9_common; diff --git a/src/target/mips32.c b/src/target/mips32.c index ac26e64..d1722c1 100644 --- a/src/target/mips32.c +++ b/src/target/mips32.c @@ -315,7 +315,7 @@ reg_cache_t *mips32_build_reg_cache(target_t *target) return cache; } -int mips32_init_arch_info(target_t *target, mips32_common_t *mips32, jtag_tap_t *tap) +int mips32_init_arch_info(target_t *target, mips32_common_t *mips32, struct jtag_tap *tap) { target->arch_info = mips32; mips32->common_magic = MIPS32_COMMON_MAGIC; diff --git a/src/target/mips32.h b/src/target/mips32.h index 005798d..64328e3 100644 --- a/src/target/mips32.h +++ b/src/target/mips32.h @@ -127,7 +127,7 @@ typedef struct mips32_core_reg_s int mips32_arch_state(struct target_s *target); int mips32_init_arch_info(target_t *target, - mips32_common_t *mips32, jtag_tap_t *tap); + mips32_common_t *mips32, struct jtag_tap *tap); int mips32_restore_context(target_t *target); int mips32_save_context(target_t *target); diff --git a/src/target/mips_ejtag.c b/src/target/mips_ejtag.c index ef7f63e..021e3ab 100644 --- a/src/target/mips_ejtag.c +++ b/src/target/mips_ejtag.c @@ -29,7 +29,7 @@ int mips_ejtag_set_instr(mips_ejtag_t *ejtag_info, int new_instr, void *delete_me_and_submit_patch) { - jtag_tap_t *tap; + struct jtag_tap *tap; tap = ejtag_info->tap; if (tap == NULL) @@ -100,7 +100,7 @@ int mips_ejtag_get_impcode(mips_ejtag_t *ejtag_info, uint32_t *impcode) int mips_ejtag_drscan_32(mips_ejtag_t *ejtag_info, uint32_t *data) { - jtag_tap_t *tap; + struct jtag_tap *tap; tap = ejtag_info->tap; if (tap == NULL) diff --git a/src/target/mips_ejtag.h b/src/target/mips_ejtag.h index 69ede52..74cb21d 100644 --- a/src/target/mips_ejtag.h +++ b/src/target/mips_ejtag.h @@ -104,7 +104,7 @@ typedef struct mips_ejtag_s { - jtag_tap_t *tap; + struct jtag_tap *tap; uint32_t impcode; uint32_t idcode; /*int use_dma;*/ diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index 07731a0..909745a 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -917,7 +917,7 @@ int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target_s *tar return ERROR_OK; } -int mips_m4k_init_arch_info(target_t *target, mips_m4k_common_t *mips_m4k, jtag_tap_t *tap) +int mips_m4k_init_arch_info(target_t *target, mips_m4k_common_t *mips_m4k, struct jtag_tap *tap) { mips32_common_t *mips32 = &mips_m4k->mips32_common; diff --git a/src/target/target.c b/src/target/target.c index 6346ae0..2528a64 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3785,7 +3785,7 @@ static int target_configure(Jim_GetOptInfo *goi, target_t *target) case TCFG_CHAIN_POSITION: if (goi->isconfigure) { Jim_Obj *o; - jtag_tap_t *tap; + struct jtag_tap *tap; target_free_all_working_areas(target); e = Jim_GetOpt_Obj(goi, &o); if (e != JIM_OK) { diff --git a/src/target/target.h b/src/target/target.h index 5a61170..f5b6eb2 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -136,7 +136,7 @@ typedef struct target_s target_type_t *type; /* target type definition (name, access functions) */ const char *cmd_name; /* tcl Name of target */ int target_number; /* DO NOT USE! field to be removed in 2010 */ - jtag_tap_t *tap; /* where on the jtag chain is this */ + struct jtag_tap *tap; /* where on the jtag chain is this */ const char *variant; /* what varient of this chip is it? */ target_event_action_t *event_action; diff --git a/src/target/xscale.c b/src/target/xscale.c index 88914b5..c4d22b1 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -156,7 +156,7 @@ static int xscale_verify_pointer(struct command_context_s *cmd_ctx, return ERROR_OK; } -static int xscale_jtag_set_instr(jtag_tap_t *tap, uint32_t new_instr) +static int xscale_jtag_set_instr(struct jtag_tap *tap, uint32_t new_instr) { if (tap == NULL) return ERROR_FAIL; @@ -2868,7 +2868,7 @@ static int xscale_init_target(struct command_context_s *cmd_ctx, } static int xscale_init_arch_info(target_t *target, - xscale_common_t *xscale, jtag_tap_t *tap, const char *variant) + xscale_common_t *xscale, struct jtag_tap *tap, const char *variant) { armv4_5_common_t *armv4_5; uint32_t high_reset_branch, low_reset_branch; diff --git a/src/xsvf/xsvf.c b/src/xsvf/xsvf.c index e0756b5..e1a30e6 100644 --- a/src/xsvf/xsvf.c +++ b/src/xsvf/xsvf.c @@ -217,7 +217,7 @@ COMMAND_HANDLER(handle_xsvf_command) additional devices in the scan chain, otherwise the device that should be affected */ - jtag_tap_t *tap = NULL; + struct jtag_tap *tap = NULL; if (argc < 2) { |