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:
committed by
Antonio Borneo
parent
fc268f8326
commit
8d3728f931
@@ -386,6 +386,7 @@ static int jtag_tap_configure_cmd(struct jim_getopt_info *goi, struct jtag_tap *
|
||||
#define NTAP_OPT_EXPECTED_ID 5
|
||||
#define NTAP_OPT_VERSION 6
|
||||
#define NTAP_OPT_BYPASS 7
|
||||
#define NTAP_OPT_IRBYPASS 8
|
||||
|
||||
static const struct nvp jtag_newtap_opts[] = {
|
||||
{ .name = "-irlen", .value = NTAP_OPT_IRLEN },
|
||||
@@ -396,6 +397,7 @@ static const struct nvp jtag_newtap_opts[] = {
|
||||
{ .name = "-expected-id", .value = NTAP_OPT_EXPECTED_ID },
|
||||
{ .name = "-ignore-version", .value = NTAP_OPT_VERSION },
|
||||
{ .name = "-ignore-bypass", .value = NTAP_OPT_BYPASS },
|
||||
{ .name = "-ir-bypass", .value = NTAP_OPT_IRBYPASS },
|
||||
{ .name = NULL, .value = -1 },
|
||||
};
|
||||
|
||||
@@ -499,6 +501,15 @@ static COMMAND_HELPER(handle_jtag_newtap_args, struct jtag_tap *tap)
|
||||
tap->ignore_bypass = true;
|
||||
break;
|
||||
|
||||
case NTAP_OPT_IRBYPASS:
|
||||
if (!CMD_ARGC)
|
||||
return ERROR_COMMAND_ARGUMENT_INVALID;
|
||||
|
||||
COMMAND_PARSE_NUMBER(u64, CMD_ARGV[0], tap->ir_bypass_value);
|
||||
CMD_ARGC--;
|
||||
CMD_ARGV++;
|
||||
break;
|
||||
|
||||
default:
|
||||
nvp_unknown_command_print(CMD, jtag_newtap_opts, NULL, CMD_ARGV[-1]);
|
||||
return ERROR_COMMAND_ARGUMENT_INVALID;
|
||||
@@ -752,6 +763,7 @@ static const struct command_registration jtag_subcommand_handlers[] = {
|
||||
"['-ignore-version'] "
|
||||
"['-ignore-bypass'] "
|
||||
"['-ircapture' number] "
|
||||
"['-ir-bypass' number] "
|
||||
"['-mask' number]",
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user