From b8b34e7b1dc6bf6125e9ccda4cad304dbb86ec68 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Wed, 29 Apr 2020 16:07:16 +0200 Subject: [PATCH] adiv5: remove cfg for AP structure, cfg is only used local. --- src/target/adiv5.c | 6 ++++-- src/target/adiv5.h | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/target/adiv5.c b/src/target/adiv5.c index 7cccffa..034b48a 100644 --- a/src/target/adiv5.c +++ b/src/target/adiv5.c @@ -422,7 +422,6 @@ ADIv5_AP_t *adiv5_new_ap(ADIv5_DP_t *dp, uint8_t apsel) memcpy(ap, &tmpap, sizeof(*ap)); adiv5_dp_ref(dp); - ap->cfg = adiv5_ap_read(ap, ADIV5_AP_CFG); ap->base = adiv5_ap_read(ap, ADIV5_AP_BASE); ap->csw = adiv5_ap_read(ap, ADIV5_AP_CSW) & ~(ADIV5_AP_CSW_SIZE_MASK | ADIV5_AP_CSW_ADDRINC_MASK); @@ -432,8 +431,11 @@ ADIv5_AP_t *adiv5_new_ap(ADIv5_DP_t *dp, uint8_t apsel) ap->csw &= ~ADIV5_AP_CSW_TRINPROG; } +#if defined(ENABLE_DEBUG) + uint32_t cfg = adiv5_ap_read(ap, ADIV5_AP_CFG); DEBUG("AP %3d: IDR=%08"PRIx32" CFG=%08"PRIx32" BASE=%08"PRIx32" CSW=%08"PRIx32"\n", - apsel, ap->idr, ap->cfg, ap->base, ap->csw); + apsel, ap->idr, cfg, ap->base, ap->csw); +#endif return ap; } diff --git a/src/target/adiv5.h b/src/target/adiv5.h index 60d8933..79b084e 100644 --- a/src/target/adiv5.h +++ b/src/target/adiv5.h @@ -177,7 +177,6 @@ typedef struct ADIv5_AP_s { uint8_t apsel; uint32_t idr; - uint32_t cfg; uint32_t base; uint32_t csw; } ADIv5_AP_t;