jtag: add -ir-bypass option to newtap

Some devices with an internal multi-tap JTAG router require a vendor
specific bypass instruction to bypass the master TAP when addressing
slave taps internal to the same device. On these devices the standard
bypass instruction bypasses the whole device.

Change-Id: I4506f0e67c9e4dfe39b7fa18c63d67900313e594
Signed-off-by: Henrik Nordström <henrik.nordstrom@addiva.se>
Reviewed-on: https://review.openocd.org/c/openocd/+/8041
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
Henrik Nordström
2023-12-17 23:14:37 +01:00
committed by Antonio Borneo
parent fc268f8326
commit 8d3728f931
7 changed files with 31 additions and 1 deletions

View File

@@ -85,7 +85,13 @@ int interface_jtag_add_ir_scan(struct jtag_tap *active,
tap->bypass = true;
field->num_bits = tap->ir_length;
field->out_value = buf_set_ones(cmd_queue_alloc(DIV_ROUND_UP(tap->ir_length, 8)), tap->ir_length);
if (tap->ir_bypass_value) {
uint8_t *v = cmd_queue_alloc(DIV_ROUND_UP(tap->ir_length, 8));
buf_set_u64(v, 0, tap->ir_length, tap->ir_bypass_value);
field->out_value = v;
} else {
field->out_value = buf_set_ones(cmd_queue_alloc(DIV_ROUND_UP(tap->ir_length, 8)), tap->ir_length);
}
field->in_value = NULL; /* do not collect input for tap's in bypass */
}