From b1c00e5a4e038068dce4512c5a2eb3735990b880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Mon, 1 Mar 2010 15:39:41 +0100 Subject: [PATCH] zy1000: faster jtag_add_ir_scan() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Faster and simpler. Signed-off-by: Øyvind Harboe --- src/jtag/zy1000/zy1000.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 6465aaa7b..c5bc0ffd9 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -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}; + assert(scan_size <= 32); + shiftValueInner(TAP_IRSHIFT, pause?TAP_IRPAUSE:TAP_IRSHIFT, scan_size, 0xffffffff); - 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); tap->bypass = 1; } }