From 6631419beba62893075eae5e1e13ddba9062d4f5 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Wed, 11 Dec 2024 09:34:57 +0100 Subject: [PATCH] jtag: drivers: xlnx-pcie-xvc: use correct TMS polarity during pathmove The xlnx_pcie_xvc_execute_pathmove() function checks whether TMS should be high or low for transitioning from the current state to the next state, but then calls xlnx_pcie_xvc_transact() with the opposite level, leading to invalid state transitions. Fix the polarity of TMS in the calls to xlnx_pcie_xvc_transact() to match the required TMS level. Change-Id: I2383e41fb70063e26aa69fabcf728df597607934 Signed-off-by: Henrik Brix Andersen Reviewed-on: https://review.openocd.org/c/openocd/+/8613 Reviewed-by: Moritz Fischer Tested-by: jenkins Reviewed-by: Antonio Borneo Reviewed-by: Nicolas Derumigny --- src/jtag/drivers/xlnx-pcie-xvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jtag/drivers/xlnx-pcie-xvc.c b/src/jtag/drivers/xlnx-pcie-xvc.c index 3baa183d9..5208e2b87 100644 --- a/src/jtag/drivers/xlnx-pcie-xvc.c +++ b/src/jtag/drivers/xlnx-pcie-xvc.c @@ -210,9 +210,9 @@ static int xlnx_pcie_xvc_execute_pathmove(struct jtag_command *cmd) for (unsigned int i = 0; i < num_states; i++) { if (path[i] == tap_state_transition(tap_get_state(), false)) { - err = xlnx_pcie_xvc_transact(1, 1, 0, NULL); - } else if (path[i] == tap_state_transition(tap_get_state(), true)) { err = xlnx_pcie_xvc_transact(1, 0, 0, NULL); + } else if (path[i] == tap_state_transition(tap_get_state(), true)) { + err = xlnx_pcie_xvc_transact(1, 1, 0, NULL); } else { LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition.", tap_state_name(tap_get_state()),