diff --git a/src/jtag/commands.h b/src/jtag/commands.h index 87bd9c537..d591814f5 100644 --- a/src/jtag/commands.h +++ b/src/jtag/commands.h @@ -139,7 +139,14 @@ union jtag_command_container { */ enum jtag_command_type { JTAG_SCAN = 1, - JTAG_STATEMOVE = 2, + /* JTAG_TLR_RESET's non-minidriver implementation is a + * vestige from a statemove cmd. The statemove command + * is obsolete and replaced by pathmove. + * + * pathmove does not support reset as one of it's states, + * hence the need for an explicit statemove command. + */ + JTAG_TLR_RESET = 2, JTAG_RUNTEST = 3, JTAG_RESET = 4, JTAG_PATHMOVE = 6, diff --git a/src/jtag/drivers/amt_jtagaccel.c b/src/jtag/drivers/amt_jtagaccel.c index 121649bcb..fca8cfe32 100644 --- a/src/jtag/drivers/amt_jtagaccel.c +++ b/src/jtag/drivers/amt_jtagaccel.c @@ -356,7 +356,7 @@ static int amt_jtagaccel_execute_queue(void) amt_jtagaccel_end_state(cmd->cmd.runtest->end_state); amt_jtagaccel_runtest(cmd->cmd.runtest->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); #endif diff --git a/src/jtag/drivers/arm-jtag-ew.c b/src/jtag/drivers/arm-jtag-ew.c index e54c8c614..9d8b8b122 100644 --- a/src/jtag/drivers/arm-jtag-ew.c +++ b/src/jtag/drivers/arm-jtag-ew.c @@ -117,7 +117,7 @@ static int armjtagew_execute_queue(void) armjtagew_runtest(cmd->cmd.runtest->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: DEBUG_JTAG_IO("statemove end in %i", cmd->cmd.statemove->end_state); armjtagew_end_state(cmd->cmd.statemove->end_state); diff --git a/src/jtag/drivers/bitbang.c b/src/jtag/drivers/bitbang.c index 6159ef7a5..4548cb531 100644 --- a/src/jtag/drivers/bitbang.c +++ b/src/jtag/drivers/bitbang.c @@ -304,7 +304,7 @@ int bitbang_execute_queue(void) bitbang_stableclocks(cmd->cmd.stableclocks->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("statemove end in %s", tap_state_name(cmd->cmd.statemove->end_state)); #endif diff --git a/src/jtag/drivers/bitq.c b/src/jtag/drivers/bitq.c index 79ca349ad..a58f63347 100644 --- a/src/jtag/drivers/bitq.c +++ b/src/jtag/drivers/bitq.c @@ -323,7 +323,7 @@ int bitq_execute_queue(void) bitq_runtest(cmd->cmd.runtest->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); #endif diff --git a/src/jtag/drivers/buspirate.c b/src/jtag/drivers/buspirate.c index 99210d26f..1c433a96d 100644 --- a/src/jtag/drivers/buspirate.c +++ b/src/jtag/drivers/buspirate.c @@ -146,7 +146,7 @@ static int buspirate_execute_queue(void) buspirate_runtest(cmd->cmd.runtest ->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: DEBUG_JTAG_IO("statemove end in %s", tap_state_name(cmd->cmd.statemove ->end_state)); diff --git a/src/jtag/drivers/driver.c b/src/jtag/drivers/driver.c index 7f7f8791b..49f40246e 100644 --- a/src/jtag/drivers/driver.c +++ b/src/jtag/drivers/driver.c @@ -338,7 +338,7 @@ int interface_jtag_add_tlr(void) jtag_queue_command(cmd); - cmd->type = JTAG_STATEMOVE; + cmd->type = JTAG_TLR_RESET; cmd->cmd.statemove = cmd_queue_alloc(sizeof(struct statemove_command)); cmd->cmd.statemove->end_state = state; diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c index 93d1c4a80..2ac410a5d 100644 --- a/src/jtag/drivers/ft2232.c +++ b/src/jtag/drivers/ft2232.c @@ -1978,7 +1978,7 @@ static int ft2232_execute_command(struct jtag_command *cmd) { 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; + case JTAG_TLR_RESET: retval = ft2232_execute_statemove(cmd); break; case JTAG_PATHMOVE: retval = ft2232_execute_pathmove(cmd); break; case JTAG_SCAN: retval = ft2232_execute_scan(cmd); break; case JTAG_SLEEP: retval = ft2232_execute_sleep(cmd); break; diff --git a/src/jtag/drivers/gw16012.c b/src/jtag/drivers/gw16012.c index 0e9f3fe2b..cb29d33aa 100644 --- a/src/jtag/drivers/gw16012.c +++ b/src/jtag/drivers/gw16012.c @@ -344,7 +344,7 @@ static int gw16012_execute_queue(void) gw16012_end_state(cmd->cmd.runtest->end_state); gw16012_runtest(cmd->cmd.runtest->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); #endif diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index 21dfab227..34fce3888 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -202,7 +202,7 @@ static void jlink_execute_command(struct jtag_command *cmd) switch (cmd->type) { case JTAG_RUNTEST: jlink_execute_runtest(cmd); break; - case JTAG_STATEMOVE: jlink_execute_statemove(cmd); break; + case JTAG_TLR_RESET: jlink_execute_statemove(cmd); break; case JTAG_PATHMOVE: jlink_execute_pathmove(cmd); break; case JTAG_SCAN: jlink_execute_scan(cmd); break; case JTAG_RESET: jlink_execute_reset(cmd); break; diff --git a/src/jtag/drivers/rlink.c b/src/jtag/drivers/rlink.c index 43f194020..0060baff0 100644 --- a/src/jtag/drivers/rlink.c +++ b/src/jtag/drivers/rlink.c @@ -1398,7 +1398,7 @@ int rlink_execute_queue(void) switch (cmd->type) { case JTAG_RUNTEST: - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: case JTAG_PATHMOVE: case JTAG_SCAN: break; @@ -1430,7 +1430,7 @@ int rlink_execute_queue(void) rlink_end_state(cmd->cmd.runtest->end_state); rlink_runtest(cmd->cmd.runtest->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); #endif diff --git a/src/jtag/drivers/usbprog.c b/src/jtag/drivers/usbprog.c index 0d51b27f8..cc7855564 100644 --- a/src/jtag/drivers/usbprog.c +++ b/src/jtag/drivers/usbprog.c @@ -131,7 +131,7 @@ static int usbprog_execute_queue(void) usbprog_end_state(cmd->cmd.runtest->end_state); usbprog_runtest(cmd->cmd.runtest->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: #ifdef _DEBUG_JTAG_IO_ LOG_DEBUG("statemove end in %i", cmd->cmd.statemove->end_state); #endif diff --git a/src/jtag/drivers/vsllink.c b/src/jtag/drivers/vsllink.c index a98567729..450ce062b 100644 --- a/src/jtag/drivers/vsllink.c +++ b/src/jtag/drivers/vsllink.c @@ -165,7 +165,7 @@ static int vsllink_execute_queue(void) vsllink_runtest(cmd->cmd.runtest->num_cycles); break; - case JTAG_STATEMOVE: + case JTAG_TLR_RESET: DEBUG_JTAG_IO("statemove end in %s", tap_state_name(cmd->cmd.statemove ->end_state));