when -ignore-version is used we should mask of the upper 4bits not 8bits.
Change-Id: I9ffe24c2aeeb414677357a647609fdf018890194
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/473
Tested-by: jenkins
option. When vendors put out multiple versions of a chip, or use the same
JTAG-level ID for several largely-compatible chips, it may be more practical
to ignore the version field than to update config files to handle all of
-the various chip IDs.
+the various chip IDs. The version field is defined as bit 28-31 of the IDCODE.
@item @code{-ircapture} @var{NUMBER}
@*The bit pattern loaded by the TAP into the JTAG shift register
on entry to the @sc{ircapture} state, such as 0x01.
if (0 == tap->expected_ids_cnt && !idcode)
return true;
- /* optionally ignore the JTAG version field */
- uint32_t mask = tap->ignore_version ? ~(0xff << 24) : ~0;
+ /* optionally ignore the JTAG version field - bits 28-31 of IDCODE */
+ uint32_t mask = tap->ignore_version ? ~(0xf << 28) : ~0;
idcode &= mask;