jtag: use correct tap -ignore-version mask

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
This commit is contained in:
Spencer Oliver
2012-02-21 10:13:21 +00:00
committed by Andreas Fritiofson
parent d431af34fe
commit 5793056d96
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -958,8 +958,8 @@ static bool jtag_examine_chain_match_tap(const struct jtag_tap *tap)
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;