adiv5: Remove only local dp_idcode used from ADIv5_DP_t struct.

This commit is contained in:
Uwe Bonnes 2020-04-29 16:13:26 +02:00
parent b8b34e7b1d
commit 16967b4328
2 changed files with 2 additions and 3 deletions

View File

@ -492,8 +492,8 @@ void adiv5_dp_init(ADIv5_DP_t *dp)
);
DEBUG("RESET_SEQ %s\n", (platform_timeout_is_expired(&timeout)) ? "failed": "succeeded");
dp->dp_idcode = adiv5_dp_read(dp, ADIV5_DP_IDCODE);
if ((dp->dp_idcode & ADIV5_DP_VERSION_MASK) == ADIV5_DPv2) {
uint32_t dp_idcode = adiv5_dp_read(dp, ADIV5_DP_IDCODE);
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);

View File

@ -134,7 +134,6 @@ typedef struct ADIv5_DP_s {
int refcnt;
uint32_t idcode;
uint32_t dp_idcode; /* Contains DPvX revision*/
uint32_t targetid; /* Contains IDCODE for DPv2 devices.*/
uint32_t (*dp_read)(struct ADIv5_DP_s *dp, uint16_t addr);