jtag_scan: Remove the now redundant IDCode parameter from the handlers
This commit is contained in:
parent
27c143a3a3
commit
d1c9d94174
|
@ -1010,7 +1010,7 @@ int jtag_scan_stlinkv2(bmp_info_t *info, const uint8_t *irlens)
|
||||||
if((jtag_devs[i].jd_idcode & dev_descr[j].idmask) ==
|
if((jtag_devs[i].jd_idcode & dev_descr[j].idmask) ==
|
||||||
dev_descr[j].idcode) {
|
dev_descr[j].idcode) {
|
||||||
if(dev_descr[j].handler)
|
if(dev_descr[j].handler)
|
||||||
dev_descr[j].handler(i, dev_descr[j].idcode);
|
dev_descr[j].handler(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ void adiv5_ap_ref(ADIv5_AP_t *ap);
|
||||||
void adiv5_ap_unref(ADIv5_AP_t *ap);
|
void adiv5_ap_unref(ADIv5_AP_t *ap);
|
||||||
void platform_add_jtag_dev(const int dev_index, const jtag_dev_t *jtag_dev);
|
void platform_add_jtag_dev(const int dev_index, const jtag_dev_t *jtag_dev);
|
||||||
|
|
||||||
void adiv5_jtag_dp_handler(uint8_t jd_index, uint32_t j_idcode);
|
void adiv5_jtag_dp_handler(uint8_t jd_index);
|
||||||
int platform_jtag_dp_init(ADIv5_DP_t *dp);
|
int platform_jtag_dp_init(ADIv5_DP_t *dp);
|
||||||
int swdptap_init(ADIv5_DP_t *dp);
|
int swdptap_init(ADIv5_DP_t *dp);
|
||||||
|
|
||||||
|
|
|
@ -39,14 +39,13 @@
|
||||||
|
|
||||||
static uint32_t adiv5_jtagdp_error(ADIv5_DP_t *dp);
|
static uint32_t adiv5_jtagdp_error(ADIv5_DP_t *dp);
|
||||||
|
|
||||||
void adiv5_jtag_dp_handler(uint8_t jd_index, uint32_t j_idcode)
|
void adiv5_jtag_dp_handler(uint8_t jd_index)
|
||||||
{
|
{
|
||||||
ADIv5_DP_t *dp = (void*)calloc(1, sizeof(*dp));
|
ADIv5_DP_t *dp = (void*)calloc(1, sizeof(*dp));
|
||||||
if (!dp) { /* calloc failed: heap exhaustion */
|
if (!dp) { /* calloc failed: heap exhaustion */
|
||||||
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 = jtag_devs[jd_index].jd_idcode;
|
dp->idcode = jtag_devs[jd_index].jd_idcode;
|
||||||
|
|
|
@ -22,7 +22,7 @@ typedef const struct jtag_dev_descr_s {
|
||||||
const uint32_t idcode;
|
const uint32_t idcode;
|
||||||
const uint32_t idmask;
|
const uint32_t idmask;
|
||||||
const char * const descr;
|
const char * const descr;
|
||||||
void (*const handler)(uint8_t jd_index, uint32_t j_idcode);
|
void (*const handler)(uint8_t jd_index);
|
||||||
} jtag_dev_descr_t;
|
} jtag_dev_descr_t;
|
||||||
extern jtag_dev_descr_t dev_descr[];
|
extern jtag_dev_descr_t dev_descr[];
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ int jtag_scan(const uint8_t *irlens)
|
||||||
jtag_devs[i].jd_descr = dev_descr[j].descr;
|
jtag_devs[i].jd_descr = dev_descr[j].descr;
|
||||||
/* Call handler to initialise/probe device further */
|
/* Call handler to initialise/probe device further */
|
||||||
if(dev_descr[j].handler)
|
if(dev_descr[j].handler)
|
||||||
dev_descr[j].handler(i, dev_descr[i].idcode);
|
dev_descr[j].handler(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue