From 75e7659f318b75dee0c2707cf4e870d20988cd5d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 8 Mar 2011 03:14:51 +0000 Subject: [PATCH] add more comments related to IDCODE/BYPASS behavior when detecting parts git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1897 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 4 ++++ urjtag/src/tap/detect.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 7724637c..42bfa1db 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -5,6 +5,10 @@ * MAINTAINERS: Update paths to Blackfin related files. + * src/tap/detect.c (urj_tap_detect_parts): Clarify detect behavior with + parts that default to IDCODE or BYPASS since both are acceptable to the + JTAG IEEE standard. + 2011-02-24 Mike Frysinger * src/tap/cable/ft2232.c: Rename user-facing cable string from diff --git a/urjtag/src/tap/detect.c b/urjtag/src/tap/detect.c index 024f2967..6599e7f9 100644 --- a/urjtag/src/tap/detect.c +++ b/urjtag/src/tap/detect.c @@ -284,7 +284,7 @@ urj_tap_detect_parts (urj_chain_t *chain, const char *db_path) if (urj_tap_register_compare (one, br) == 0) { - /* part with id */ + /* Part that supports IDCODE */ if (all_ids) memcpy (id->data, &all_ids->data[i * 32 + 1], 31 * sizeof (id->data[0])); else @@ -297,8 +297,14 @@ urj_tap_detect_parts (urj_chain_t *chain, const char *db_path) urj_log (URJ_LOG_LEVEL_NORMAL, _("Device Id: %s (0x%0*" PRIX64 ")\n"), urj_tap_register_get_string (did), did->len / 4, urj_tap_register_get_value (did)); - } else - urj_log (URJ_LOG_LEVEL_NORMAL, _("Device Id: unknown as bit 0 was not a 1\n")); + } + else + { + /* If the device does not provide IDCODE, then it'll be in BYPASS + * mode after we reset the state machine. So we'll get a 0 here. + * Not a bug, just a sad part :(. */ + urj_log (URJ_LOG_LEVEL_NORMAL, _("Device Id: not supported (bit 0 was not a 1)\n")); + } part = urj_part_alloc (did); if (part == NULL)