target/adi_v5_jtag: fix endianness error in transaction replay
The code for JTAG WAIT recovery did not handle DP_SELECT endianness. While on it, mark missing ADIv6 DP SELECT1 handling as TODO. Change-Id: I44f3bc8fc9fd2483c0293b6d4f2c51a60ca01873 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7540 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
6ecd99ff9b
commit
415715d91a
|
@ -566,14 +566,20 @@ static int jtagdp_overrun_check(struct adiv5_dap *dap)
|
|||
/* restore SELECT register first */
|
||||
if (!list_empty(&replay_list)) {
|
||||
el = list_first_entry(&replay_list, struct dap_cmd, lh);
|
||||
|
||||
uint8_t out_value_buf[4];
|
||||
buf_set_u32(out_value_buf, 0, 32, (uint32_t)(el->dp_select));
|
||||
|
||||
tmp = dap_cmd_new(dap, JTAG_DP_DPACC,
|
||||
DP_SELECT, DPAP_WRITE, (uint8_t *)&el->dp_select, NULL, 0);
|
||||
DP_SELECT, DPAP_WRITE, out_value_buf, NULL, 0);
|
||||
if (!tmp) {
|
||||
retval = ERROR_JTAG_DEVICE_ERROR;
|
||||
goto done;
|
||||
}
|
||||
list_add(&tmp->lh, &replay_list);
|
||||
|
||||
/* TODO: ADIv6 DP SELECT1 handling */
|
||||
|
||||
dap->select = DP_SELECT_INVALID;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue