X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fjtag%2Fdrivers%2Farm-jtag-ew.c;h=d9ea367ce4ed8a44aba3604d35b12cb90c973975;hb=refs%2Fchanges%2F88%2F3488%2F3;hp=35b6b929f18420343eb820578ce6ce6a18beb129;hpb=de0130a0aad83c1ef692ee4d68ab996a8668424d;p=openocd.git diff --git a/src/jtag/drivers/arm-jtag-ew.c b/src/jtag/drivers/arm-jtag-ew.c index 35b6b929f1..d9ea367ce4 100644 --- a/src/jtag/drivers/arm-jtag-ew.c +++ b/src/jtag/drivers/arm-jtag-ew.c @@ -13,9 +13,7 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * along with this program. If not, see . * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -355,7 +353,10 @@ static void armjtagew_scan(bool ir_scan, /* Move to appropriate scan state */ armjtagew_end_state(ir_scan ? TAP_IRSHIFT : TAP_DRSHIFT); - armjtagew_state_move(); + /* Only move if we're not already there */ + if (tap_get_state() != tap_get_end_state()) + armjtagew_state_move(); + armjtagew_end_state(saved_end_state); /* Scan */