adiv5: Remove unnescessary read.

This commit is contained in:
Uwe Bonnes 2020-11-07 17:46:18 +01:00 committed by UweBonnes
parent cda83d3084
commit 19e1fddba2
1 changed files with 1 additions and 2 deletions

View File

@ -691,8 +691,7 @@ void adiv5_dp_init(ADIv5_DP_t *dp)
}
}
uint32_t dp_idcode = adiv5_dp_read(dp, ADIV5_DP_IDCODE);
if ((dp_idcode & ADIV5_DP_VERSION_MASK) == ADIV5_DPv2) {
if ((dp->idcode & ADIV5_DP_VERSION_MASK) == ADIV5_DPv2) {
/* Read TargetID. Can be done with device in WFI, sleep or reset!*/
adiv5_dp_write(dp, ADIV5_DP_SELECT, ADIV5_DP_BANK2);
dp->targetid = adiv5_dp_read(dp, ADIV5_DP_CTRLSTAT);