The attached patch removes the unused JTAG_END_STATE. This is handled above interfaces today, so this code is never invoked.
The next patch would be to remove all TAP_INVALID references in the interfaces, this too is handled above the interface level today. (I can't commit this now since I'll be out of the office next week, but I thought it would be helpful to post it for comments meanwhile...) -- Øyvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com
Index: C:/workspace/openocd/src/jtag/amt_jtagaccel.c =================================================================== --- C:/workspace/openocd/src/jtag/amt_jtagaccel.c (revision 1857) +++ C:/workspace/openocd/src/jtag/amt_jtagaccel.c (working copy) @@ -332,13 +332,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: -#ifdef _DEBUG_JTAG_IO_ - LOG_DEBUG("end_state: %i", cmd->cmd.end_state->end_state); -#endif - if (cmd->cmd.end_state->end_state != TAP_INVALID) - amt_jtagaccel_end_state(cmd->cmd.end_state->end_state); - break; case JTAG_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("reset trst: %i srst %i", cmd->cmd.reset->trst, cmd->cmd.reset->srst); Index: C:/workspace/openocd/src/jtag/arm-jtag-ew.c =================================================================== --- C:/workspace/openocd/src/jtag/arm-jtag-ew.c (revision 1857) +++ C:/workspace/openocd/src/jtag/arm-jtag-ew.c (working copy) @@ -133,15 +133,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: - DEBUG_JTAG_IO("end_state: %i", cmd->cmd.end_state->end_state); - - if (cmd->cmd.end_state->end_state != TAP_INVALID) - { - armjtagew_end_state(cmd->cmd.end_state->end_state); - } - break; - case JTAG_RUNTEST: DEBUG_JTAG_IO( "runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, \ cmd->cmd.runtest->end_state); Index: C:/workspace/openocd/src/jtag/bitbang.c =================================================================== --- C:/workspace/openocd/src/jtag/bitbang.c (revision 1857) +++ C:/workspace/openocd/src/jtag/bitbang.c (working copy) @@ -253,13 +253,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: -#ifdef _DEBUG_JTAG_IO_ - LOG_DEBUG("end_state: %s", tap_state_name(cmd->cmd.end_state->end_state) ); -#endif - if (cmd->cmd.end_state->end_state != TAP_INVALID) - bitbang_end_state(cmd->cmd.end_state->end_state); - break; case JTAG_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("reset trst: %i srst %i", cmd->cmd.reset->trst, cmd->cmd.reset->srst); Index: C:/workspace/openocd/src/jtag/bitq.c =================================================================== --- C:/workspace/openocd/src/jtag/bitq.c (revision 1857) +++ C:/workspace/openocd/src/jtag/bitq.c (working copy) @@ -296,13 +296,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: -#ifdef _DEBUG_JTAG_IO_ - LOG_DEBUG("end_state: %i", cmd->cmd.end_state->end_state); -#endif - bitq_end_state(cmd->cmd.end_state->end_state); - break; - case JTAG_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("reset trst: %i srst %i", cmd->cmd.reset->trst, cmd->cmd.reset->srst); Index: C:/workspace/openocd/src/jtag/ft2232.c =================================================================== --- C:/workspace/openocd/src/jtag/ft2232.c (revision 1857) +++ C:/workspace/openocd/src/jtag/ft2232.c (working copy) @@ -499,17 +499,6 @@ } -void ft2232_end_state(tap_state_t state) -{ - if (tap_is_state_stable(state)) - tap_set_end_state(state); - else - { - LOG_ERROR("BUG: %s is not a stable end state", tap_state_name(state)); - exit(-1); - } -} - static void ft2232_read_scan(enum scan_type type, u8* buffer, int scan_size) { @@ -1410,19 +1399,7 @@ LOG_DEBUG("trst: %i, srst: %i, high_output: 0x%2.2x, high_direction: 0x%2.2x", trst, srst, high_output, high_direction); } -static int ft2232_execute_end_state(jtag_command_t *cmd) -{ - int retval; - retval = ERROR_OK; - - DEBUG_JTAG_IO("execute_end_state: %s", tap_state_name(cmd->cmd.end_state->end_state) ); - if (cmd->cmd.end_state->end_state != TAP_INVALID) - ft2232_end_state(cmd->cmd.end_state->end_state); - - return retval; -} - static int ft2232_execute_runtest(jtag_command_t *cmd) { @@ -1684,7 +1661,6 @@ switch (cmd->type) { - case JTAG_END_STATE: retval = ft2232_execute_end_state(cmd); break; case JTAG_RESET: retval = ft2232_execute_reset(cmd); break; case JTAG_RUNTEST: retval = ft2232_execute_runtest(cmd); break; case JTAG_STATEMOVE: retval = ft2232_execute_statemove(cmd); break; Index: C:/workspace/openocd/src/jtag/gw16012.c =================================================================== --- C:/workspace/openocd/src/jtag/gw16012.c (revision 1857) +++ C:/workspace/openocd/src/jtag/gw16012.c (working copy) @@ -354,13 +354,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: -#ifdef _DEBUG_JTAG_IO_ - LOG_DEBUG("end_state: %i", cmd->cmd.end_state->end_state); -#endif - if (cmd->cmd.end_state->end_state != TAP_INVALID) - gw16012_end_state(cmd->cmd.end_state->end_state); - break; case JTAG_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("reset trst: %i srst %i", cmd->cmd.reset->trst, cmd->cmd.reset->srst); Index: C:/workspace/openocd/src/jtag/jlink.c =================================================================== --- C:/workspace/openocd/src/jtag/jlink.c (revision 1857) +++ C:/workspace/openocd/src/jtag/jlink.c (working copy) @@ -229,7 +229,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: jlink_execute_end_state(cmd); break; case JTAG_RUNTEST: jlink_execute_runtest(cmd); break; case JTAG_STATEMOVE: jlink_execute_statemove(cmd); break; case JTAG_PATHMOVE: jlink_execute_pathmove(cmd); break; Index: C:/workspace/openocd/src/jtag/jtag.h =================================================================== --- C:/workspace/openocd/src/jtag/jtag.h (revision 1857) +++ C:/workspace/openocd/src/jtag/jtag.h (working copy) @@ -350,7 +350,6 @@ JTAG_STATEMOVE = 2, JTAG_RUNTEST = 3, JTAG_RESET = 4, - JTAG_END_STATE = 5, JTAG_PATHMOVE = 6, JTAG_SLEEP = 7, JTAG_STABLECLOCKS = 8 Index: C:/workspace/openocd/src/jtag/rlink/rlink.c =================================================================== --- C:/workspace/openocd/src/jtag/rlink/rlink.c (revision 1857) +++ C:/workspace/openocd/src/jtag/rlink/rlink.c (working copy) @@ -1399,7 +1399,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: case JTAG_RUNTEST: case JTAG_STATEMOVE: case JTAG_PATHMOVE: @@ -1415,13 +1414,6 @@ switch (cmd->type) { - case JTAG_END_STATE: -#ifdef _DEBUG_JTAG_IO_ - LOG_DEBUG("end_state: %i", cmd->cmd.end_state->end_state); -#endif - if (cmd->cmd.end_state->end_state != -1) - rlink_end_state(cmd->cmd.end_state->end_state); - break; case JTAG_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("reset trst: %i srst %i", cmd->cmd.reset->trst, cmd->cmd.reset->srst); Index: C:/workspace/openocd/src/jtag/usbprog.c =================================================================== --- C:/workspace/openocd/src/jtag/usbprog.c (revision 1857) +++ C:/workspace/openocd/src/jtag/usbprog.c (working copy) @@ -135,13 +135,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: -#ifdef _DEBUG_JTAG_IO_ - LOG_DEBUG("end_state: %i", cmd->cmd.end_state->end_state); -#endif - if (cmd->cmd.end_state->end_state != TAP_INVALID) - usbprog_end_state(cmd->cmd.end_state->end_state); - break; case JTAG_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("reset trst: %i srst %i", cmd->cmd.reset->trst, cmd->cmd.reset->srst); Index: C:/workspace/openocd/src/jtag/vsllink.c =================================================================== --- C:/workspace/openocd/src/jtag/vsllink.c (revision 1857) +++ C:/workspace/openocd/src/jtag/vsllink.c (working copy) @@ -296,15 +296,6 @@ { switch (cmd->type) { - case JTAG_END_STATE: - DEBUG_JTAG_IO("end_state: %s", tap_state_name(cmd->cmd.end_state->end_state)); - - if (cmd->cmd.end_state->end_state != TAP_INVALID) - { - vsllink_end_state(cmd->cmd.end_state->end_state); - } - break; - case JTAG_RUNTEST: DEBUG_JTAG_IO( "runtest %i cycles, end in %s", cmd->cmd.runtest->num_cycles, \ tap_state_name(cmd->cmd.runtest->end_state));
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development