X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fjtag%2Fdrivers%2Famt_jtagaccel.c;h=57c0ce6005b338591c273816d90f914227514480;hb=55abb63752196de5a2e79fc4944a6af24e6414f6;hp=d89e5ffa91b3f56dba17c2ea8c2dec1baa6b4797;hpb=de0130a0aad83c1ef692ee4d68ab996a8668424d;p=openocd.git diff --git a/src/jtag/drivers/amt_jtagaccel.c b/src/jtag/drivers/amt_jtagaccel.c index d89e5ffa91..57c0ce6005 100644 --- a/src/jtag/drivers/amt_jtagaccel.c +++ b/src/jtag/drivers/amt_jtagaccel.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 @@ -124,7 +122,7 @@ static const int data_mode = IEEE1284_MODE_EPP | IEEE1284_DATA; * 4: Shift-IR * 5: Pause-IR */ -static uint8_t amt_jtagaccel_tap_move[6][6][2] = { +static const uint8_t amt_jtagaccel_tap_move[6][6][2] = { /* RESET IDLE DRSHIFT DRPAUSE IRSHIFT IRPAUSE */ { {0x1f, 0x00}, {0x0f, 0x00}, {0x05, 0x00}, {0x0a, 0x00}, {0x06, 0x00}, {0x96, 0x00} }, /* RESET */ { {0x1f, 0x00}, {0x00, 0x00}, {0x04, 0x00}, {0x05, 0x00}, {0x06, 0x00}, {0x0b, 0x00} }, /* IDLE */ @@ -264,7 +262,10 @@ static void amt_jtagaccel_scan(bool ir_scan, enum scan_type type, uint8_t *buffe else amt_jtagaccel_end_state(TAP_DRSHIFT); - amt_jtagaccel_state_move(); + /* Only move if we're not already there */ + if (tap_get_state() != tap_get_end_state()) + amt_jtagaccel_state_move(); + amt_jtagaccel_end_state(saved_end_state); /* handle unaligned bits at the beginning */