jtag_scan: Properly fixed the wrong IDCode getting to the handlers

This commit is contained in:
dragonmux 2022-01-21 21:08:21 -05:00 committed by Piotr Esden-Tempski
parent 7d2afcff06
commit 27c143a3a3
1 changed files with 2 additions and 1 deletions

View File

@ -46,9 +46,10 @@ void adiv5_jtag_dp_handler(uint8_t jd_index, uint32_t j_idcode)
DEBUG_WARN("calloc: failed in %s\n", __func__); DEBUG_WARN("calloc: failed in %s\n", __func__);
return; return;
} }
(void)j_idcode;
dp->dp_jd_index = jd_index; dp->dp_jd_index = jd_index;
dp->idcode = j_idcode; dp->idcode = jtag_devs[jd_index].jd_idcode;
if ((PC_HOSTED == 0 ) || (!platform_jtag_dp_init(dp))) { if ((PC_HOSTED == 0 ) || (!platform_jtag_dp_init(dp))) {
dp->dp_read = fw_adiv5_jtagdp_read; dp->dp_read = fw_adiv5_jtagdp_read;
dp->error = adiv5_jtagdp_error; dp->error = adiv5_jtagdp_error;