adiv5: remove cfg for AP structure, cfg is only used local.

This commit is contained in:
Uwe Bonnes 2020-04-29 16:07:16 +02:00
parent 34a13723d8
commit b8b34e7b1d
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;