Commit 42ef503d authored by Zachary T Welch's avatar Zachary T Welch
Browse files

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.
parent 9f212b01
......@@ -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 */
......
......@@ -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)
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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);
......
......@@ -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,
......
......@@ -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++)
......
......@@ -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
......
......@@ -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,
......
......@@ -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;