Do not check ir capture if there is no IDCODE

git-svn-id: svn://svn.berlios.de/openocd/trunk@2812 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe 2009-10-07 11:03:01 +00:00
parent e4cc19521b
commit 53dea2f952
1 changed files with 15 additions and 12 deletions
src/jtag

View File

@ -1108,19 +1108,22 @@ static int jtag_validate_ircapture(void)
break; break;
} }
/* Validate the two LSBs, which must be 01 per JTAG spec. if (tap->hasidcode)
* REVISIT we might be able to verify some MSBs too, using {
* ircapture/irmask attributes. /* Validate the two LSBs, which must be 01 per JTAG spec.
*/ * REVISIT we might be able to verify some MSBs too, using
val = buf_get_u32(ir_test, chain_pos, tap->ir_length); * ircapture/irmask attributes.
if ((val & 0x3) != 1) { */
LOG_ERROR("%s: IR capture error; saw 0x%0*x not 0x..1", val = buf_get_u32(ir_test, chain_pos, tap->ir_length);
jtag_tap_name(tap), if ((val & 0x3) != 1) {
(tap->ir_length + 7) / tap->ir_length, LOG_ERROR("%s: IR capture error; saw 0x%0*x not 0x..1",
val); jtag_tap_name(tap),
(tap->ir_length + 7) / tap->ir_length,
val);
retval = ERROR_JTAG_INIT_FAILED; retval = ERROR_JTAG_INIT_FAILED;
goto done; goto done;
}
} }
LOG_DEBUG("%s: IR capture 0x%0*x", jtag_tap_name(tap), LOG_DEBUG("%s: IR capture 0x%0*x", jtag_tap_name(tap),
(tap->ir_length + 7) / tap->ir_length, val); (tap->ir_length + 7) / tap->ir_length, val);