From 16967b43288028dcdc2759bb2a25a53472571162 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Wed, 29 Apr 2020 16:13:26 +0200 Subject: [PATCH] adiv5: Remove only local dp_idcode used from ADIv5_DP_t struct. --- src/target/adiv5.c | 4 ++-- src/target/adiv5.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/target/adiv5.c b/src/target/adiv5.c index 034b48a..778cd0c 100644 --- a/src/target/adiv5.c +++ b/src/target/adiv5.c @@ -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); diff --git a/src/target/adiv5.h b/src/target/adiv5.h index 79b084e..c72a7a4 100644 --- a/src/target/adiv5.h +++ b/src/target/adiv5.h @@ -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);