diff options
author | dbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-09-29 18:26:18 +0000 |
---|---|---|
committer | dbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-09-29 18:26:18 +0000 |
commit | 4297209ac91d62ab509284c142273ec38ec8cfe3 (patch) | |
tree | 03ed61569eae0d72ba479ea376db27895da8a4d5 /src/jtag | |
parent | bde4a40422fa28d1f3b430e39239b8080944185e (diff) |
Make "-expected-id 0" suppress warnings; not unlike it used to do.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2775 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag')
-rw-r--r-- | src/jtag/core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c index 78f67db3..056fa990 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -959,10 +959,14 @@ static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap) { if (tap->idcode == tap->expected_ids[ii]) return true; + + /* treat "-expected-id 0" as a "don't-warn" wildcard */ + if (0 == tap->expected_ids[ii]) + return true; } - /* If none of the expected ids matched, log an error */ - jtag_examine_chain_display(LOG_LVL_ERROR, "UNEXPECTED", + /* If none of the expected ids matched, warn */ + jtag_examine_chain_display(LOG_LVL_WARNING, "UNEXPECTED", tap->dotted_name, tap->idcode); for (ii = 0; ii < tap->expected_ids_cnt; ii++) { @@ -1025,7 +1029,7 @@ static int jtag_examine_chain(void) } tap->idcode = idcode; - // ensure the TAP ID does matches what was expected + /* ensure the TAP ID matches what was expected */ if (!jtag_examine_chain_match_tap(tap)) return ERROR_JTAG_INIT_FAILED; } |