diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-10-07 11:03:01 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-10-07 11:03:01 +0000 |
commit | 53dea2f952303c9f1a87fa42d58fae9fad4648e2 (patch) | |
tree | 35f751d958a987d6e37652fc36613a985b916d81 /src | |
parent | e4cc19521b3d3f560ad1eb7cb70e98381e4b6160 (diff) | |
download | openocd+libswd-53dea2f952303c9f1a87fa42d58fae9fad4648e2.tar.gz openocd+libswd-53dea2f952303c9f1a87fa42d58fae9fad4648e2.tar.bz2 openocd+libswd-53dea2f952303c9f1a87fa42d58fae9fad4648e2.tar.xz openocd+libswd-53dea2f952303c9f1a87fa42d58fae9fad4648e2.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/core.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c index 854236f3..0b752ea4 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -1108,19 +1108,22 @@ static int jtag_validate_ircapture(void) break; } - /* Validate the two LSBs, which must be 01 per JTAG spec. - * REVISIT we might be able to verify some MSBs too, using - * ircapture/irmask attributes. - */ - val = buf_get_u32(ir_test, chain_pos, tap->ir_length); - if ((val & 0x3) != 1) { - LOG_ERROR("%s: IR capture error; saw 0x%0*x not 0x..1", - jtag_tap_name(tap), - (tap->ir_length + 7) / tap->ir_length, - val); - - retval = ERROR_JTAG_INIT_FAILED; - goto done; + if (tap->hasidcode) + { + /* Validate the two LSBs, which must be 01 per JTAG spec. + * REVISIT we might be able to verify some MSBs too, using + * ircapture/irmask attributes. + */ + val = buf_get_u32(ir_test, chain_pos, tap->ir_length); + if ((val & 0x3) != 1) { + LOG_ERROR("%s: IR capture error; saw 0x%0*x not 0x..1", + jtag_tap_name(tap), + (tap->ir_length + 7) / tap->ir_length, + val); + + retval = ERROR_JTAG_INIT_FAILED; + goto done; + } } LOG_DEBUG("%s: IR capture 0x%0*x", jtag_tap_name(tap), (tap->ir_length + 7) / tap->ir_length, val); |