From c45de8073d027f1a4d39640dc140666f27960e3b Mon Sep 17 00:00:00 2001 From: kc8apf Date: Sat, 13 Dec 2008 06:25:50 +0000 Subject: Change tap_state naming to be consistent with SVF documentation. Courtesy of Dick Hollenbeck git-svn-id: svn://svn.berlios.de/openocd/trunk@1232 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/jtag/jtag.c | 74 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/jtag/jtag.c') diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c index 555d1409..d4864183 100644 --- a/src/jtag/jtag.c +++ b/src/jtag/jtag.c @@ -87,22 +87,22 @@ int tap_move_map[16] = { tap_transition_t tap_transitions[16] = { - {TAP_TLR, TAP_RTI}, /* TLR */ - {TAP_SIS, TAP_CD}, /* SDS */ - {TAP_E1D, TAP_SD}, /* CD */ - {TAP_E1D, TAP_SD}, /* SD */ - {TAP_UD, TAP_PD}, /* E1D */ - {TAP_E2D, TAP_PD}, /* PD */ - {TAP_UD, TAP_SD}, /* E2D */ - {TAP_SDS, TAP_RTI}, /* UD */ - {TAP_SDS, TAP_RTI}, /* RTI */ - {TAP_TLR, TAP_CI}, /* SIS */ - {TAP_E1I, TAP_SI}, /* CI */ - {TAP_E1I, TAP_SI}, /* SI */ - {TAP_UI, TAP_PI}, /* E1I */ - {TAP_E2I, TAP_PI}, /* PI */ - {TAP_UI, TAP_SI}, /* E2I */ - {TAP_SDS, TAP_RTI} /* UI */ + {TAP_RESET, TAP_IDLE}, /* TLR */ + {TAP_IRSELECT, TAP_DRCAPTURE}, /* SDS */ + {TAP_DREXIT1, TAP_DRSHIFT}, /* CD */ + {TAP_DREXIT1, TAP_DRSHIFT}, /* SD */ + {TAP_DRUPDATE, TAP_DRPAUSE}, /* E1D */ + {TAP_DREXIT2, TAP_DRPAUSE}, /* PD */ + {TAP_DRUPDATE, TAP_DRSHIFT}, /* E2D */ + {TAP_DRSELECT, TAP_IDLE}, /* UD */ + {TAP_DRSELECT, TAP_IDLE}, /* RTI */ + {TAP_RESET, TAP_IRCAPTURE}, /* SIS */ + {TAP_IREXIT1, TAP_IRSHIFT}, /* CI */ + {TAP_IREXIT1, TAP_IRSHIFT}, /* SI */ + {TAP_IRUPDATE, TAP_IRPAUSE}, /* E1I */ + {TAP_IREXIT2, TAP_IRPAUSE}, /* PI */ + {TAP_IRUPDATE, TAP_IRSHIFT}, /* E2I */ + {TAP_DRSELECT, TAP_IDLE} /* UI */ }; char* jtag_event_strings[] = @@ -115,8 +115,8 @@ char* jtag_event_strings[] = * inside the drivers, but we don't want to break * linking the drivers!!!! */ -enum tap_state end_state = TAP_TLR; -enum tap_state cur_state = TAP_TLR; +enum tap_state end_state = TAP_RESET; +enum tap_state cur_state = TAP_RESET; int jtag_trst = 0; int jtag_srst = 0; @@ -125,8 +125,8 @@ jtag_command_t **last_comand_pointer = &jtag_command_queue; static jtag_tap_t *jtag_all_taps = NULL; enum reset_types jtag_reset_config = RESET_NONE; -enum tap_state cmd_queue_end_state = TAP_TLR; -enum tap_state cmd_queue_cur_state = TAP_TLR; +enum tap_state cmd_queue_end_state = TAP_RESET; +enum tap_state cmd_queue_cur_state = TAP_RESET; int jtag_verify_capture_ir = 1; @@ -477,7 +477,7 @@ void* cmd_queue_alloc(size_t size) * alignment. * * What I do not/have is a reasonable portable means - * to align by... + * to align by... * * The solution here, is based on these suggestions. * http://gcc.gnu.org/ml/gcc-help/2008-12/msg00041.html @@ -493,8 +493,8 @@ void* cmd_queue_alloc(size_t size) // The alignment process. size = (size + ALIGN_SIZE -1) & (~(ALIGN_SIZE-1)); - // Done... - + // Done... + if (*p_page) { @@ -543,7 +543,7 @@ static void jtag_prelude1(void) return; } - if (cmd_queue_end_state == TAP_TLR) + if (cmd_queue_end_state == TAP_RESET) jtag_call_event_callbacks(JTAG_TRST_ASSERTED); } @@ -959,7 +959,7 @@ int MINIDRIVER(interface_jtag_add_plain_dr_scan)(int num_fields, scan_field_t *f void jtag_add_tlr(void) { - jtag_prelude(TAP_TLR); + jtag_prelude(TAP_RESET); int retval; retval=interface_jtag_add_tlr(); @@ -969,7 +969,7 @@ void jtag_add_tlr(void) int MINIDRIVER(interface_jtag_add_tlr)() { - enum tap_state state = TAP_TLR; + enum tap_state state = TAP_RESET; jtag_command_t **last_cmd = jtag_get_last_command_p(); /* allocate memory for a new list member */ @@ -1000,9 +1000,9 @@ void jtag_add_pathmove(int num_states, enum tap_state *path) for (i=0; iexpected_ids_cnt) { LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)", @@ -1662,7 +1662,7 @@ int jtag_validate_chain(void) field.in_handler = NULL; field.in_handler_priv = NULL; - jtag_add_plain_ir_scan(1, &field, TAP_TLR); + jtag_add_plain_ir_scan(1, &field, TAP_RESET); jtag_execute_queue(); tap = NULL; @@ -1801,8 +1801,8 @@ jim_newtap_cmd( Jim_GetOptInfo *goi ) memcpy(new_expected_ids, pTap->expected_ids, sizeof(u32) * pTap->expected_ids_cnt); new_expected_ids[pTap->expected_ids_cnt] = w; - - free(pTap->expected_ids); + + free(pTap->expected_ids); pTap->expected_ids = new_expected_ids; pTap->expected_ids_cnt++; break; -- cgit v1.2.3-18-g5258