From: Øyvind H. <go...@us...> - 2010-02-22 08:00:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 90efc404f3cb9c3f6e7fdb8a2c22fb3e72e9072f (commit) from c21c740a895438832ed7e945ee4943da3eb733f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 90efc404f3cb9c3f6e7fdb8a2c22fb3e72e9072f Author: Ãyvind Harboe <oyv...@zy...> Date: Mon Feb 8 15:40:53 2010 +0100 zy1000: jtag_add_dr_scan() performance improvement Reduce overhead in jtag_add_dr_scan() a bit. Signed-off-by: Ãyvind Harboe <oyv...@zy...> diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c index 2c205b7..ef4f482 100644 --- a/src/jtag/zy1000/zy1000.c +++ b/src/jtag/zy1000/zy1000.c @@ -650,22 +650,29 @@ int interface_jtag_add_dr_scan(int num_fields, const struct scan_field *fields, for (j = 0; j < num_fields; j++) { + /* Find a range of fields to write to this tap */ if (tap == fields[j].tap) { found = 1; + int i; + for (i = j + 1; i < num_fields; i++) + { + if (tap != fields[j].tap) + { + break; + } + } + + scanFields(i - j, fields + j, TAP_DRSHIFT, pause); - scanFields(1, fields+j, TAP_DRSHIFT, pause); + j = i; } } + if (!found) { - struct scan_field tmp; - /* program the scan field to 1 bit length, and ignore it's value */ - tmp.num_bits = 1; - tmp.out_value = NULL; - tmp.in_value = NULL; - - scanFields(1, &tmp, TAP_DRSHIFT, pause); + /* Shift out a 0 for disabled tap's */ + shiftValueInner(TAP_DRSHIFT, pause?TAP_DRPAUSE:TAP_DRSHIFT, 1, 0); } else { ----------------------------------------------------------------------- Summary of changes: src/jtag/zy1000/zy1000.c | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) hooks/post-receive -- Main OpenOCD repository |