2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-08-16 17:57:47 +10:00

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 <hebad@vestas.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8613
Reviewed-by: Moritz Fischer <moritzf@google.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Nicolas Derumigny <nicolas.derumigny@inria.fr>
This commit is contained in:
Henrik Brix Andersen 2024-12-11 09:34:57 +01:00 committed by Antonio Borneo
parent 8194fc48bd
commit 6631419beb

View File

@ -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()),