]> git.sur5r.net Git - openocd/commitdiff
zy1000: faster jtag_add_ir_scan()
authorØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 1 Mar 2010 14:39:41 +0000 (15:39 +0100)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Mon, 1 Mar 2010 14:41:49 +0000 (15:41 +0100)
Faster and simpler.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/jtag/zy1000/zy1000.c

index 6465aaa7b25db1ffbe16c705a941e2f62019ee9c..c5bc0ffd927ca47821b8b918fba030853d3a8a08 100644 (file)
@@ -608,15 +608,9 @@ int interface_jtag_add_ir_scan(int num_fields, const struct scan_field *fields,
                if (!found)
                {
                        /* if a device isn't listed, set it to BYPASS */
-                       uint8_t ones[]={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
-
-                       struct scan_field tmp;
-                       memset(&tmp, 0, sizeof(tmp));
-                       tmp.out_value = ones;
-                       tmp.num_bits = scan_size;
-                       scanFields(1, &tmp, TAP_IRSHIFT, pause);
-                       /* update device information */
-                       buf_cpy(tmp.out_value, tap->cur_instr, scan_size);
+                       assert(scan_size <= 32);
+                       shiftValueInner(TAP_IRSHIFT, pause?TAP_IRPAUSE:TAP_IRSHIFT, scan_size, 0xffffffff);
+
                        tap->bypass = 1;
                }
        }