openocd: remove 'src' prefix from #include path
[fw/openocd] / src / jtag / core.c
index 13366e01bdebb69f45b068b2b559c302a279b917..51875a00a78260c486b1747615bee4b47c146d5b 100644 (file)
@@ -1072,8 +1072,6 @@ void jtag_sleep(uint32_t us)
 
 #define JTAG_MAX_AUTO_TAPS 20
 
-#define EXTRACT_JEP106_BANK(X) (((X) & 0xf00) >> 8)
-#define EXTRACT_JEP106_ID(X)   (((X) & 0xfe) >> 1)
 #define EXTRACT_MFG(X)  (((X) & 0xffe) >> 1)
 #define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
 #define EXTRACT_VER(X)  (((X) & 0xf0000000) >> 28)
@@ -1141,7 +1139,7 @@ static void jtag_examine_chain_display(enum log_levels level, const char *msg,
                name, msg,
                (unsigned int)idcode,
                (unsigned int)EXTRACT_MFG(idcode),
-               jep106_manufacturer(EXTRACT_JEP106_BANK(idcode), EXTRACT_JEP106_ID(idcode)),
+               jep106_manufacturer(EXTRACT_MFG(idcode)),
                (unsigned int)EXTRACT_PART(idcode),
                (unsigned int)EXTRACT_VER(idcode));
 }
@@ -1338,7 +1336,6 @@ static int jtag_validate_ircapture(void)
        struct jtag_tap *tap;
        uint8_t *ir_test = NULL;
        struct scan_field field;
-       uint64_t val;
        int chain_pos = 0;
        int retval;
 
@@ -1398,7 +1395,7 @@ static int jtag_validate_ircapture(void)
                 */
                if (tap->ir_length == 0) {
                        tap->ir_length = 2;
-                       while ((val = buf_get_u64(ir_test, chain_pos, tap->ir_length + 1)) == 1
+                       while (buf_get_u64(ir_test, chain_pos, tap->ir_length + 1) == 1
                                        && tap->ir_length < JTAG_IRLEN_MAX) {
                                tap->ir_length++;
                        }
@@ -1414,7 +1411,7 @@ static int jtag_validate_ircapture(void)
                 * this part of the JTAG spec, so their capture mask/value
                 * attributes might disable this test.
                 */
-               val = buf_get_u64(ir_test, chain_pos, tap->ir_length);
+               uint64_t val = buf_get_u64(ir_test, chain_pos, tap->ir_length);
                if ((val & tap->ir_capture_mask) != tap->ir_capture_value) {
                        LOG_ERROR("%s: IR capture error; saw 0x%0*" PRIx64 " not 0x%0*" PRIx32,
                                jtag_tap_name(tap),
@@ -1430,7 +1427,7 @@ static int jtag_validate_ircapture(void)
        }
 
        /* verify the '11' sentinel we wrote is returned at the end */
-       val = buf_get_u64(ir_test, chain_pos, 2);
+       uint64_t val = buf_get_u64(ir_test, chain_pos, 2);
        if (val != 0x3) {
                char *cbuf = buf_to_hex_str(ir_test, total_ir_length);