diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2022-01-15 18:34:21 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2022-05-14 08:55:33 +0000 |
commit | 613f1c6abbc92aff22ef1731469626759f91ebaa (patch) | |
tree | d5a7ffd9cb6190fb0fea4f37abf21b033777ff2d /src/target/arm_adi_v5.h | |
parent | 7351330a0f1f6ac626964e515ed50bb43499e0e5 (diff) | |
download | riscv-openocd-613f1c6abbc92aff22ef1731469626759f91ebaa.zip riscv-openocd-613f1c6abbc92aff22ef1731469626759f91ebaa.tar.gz riscv-openocd-613f1c6abbc92aff22ef1731469626759f91ebaa.tar.bz2 |
arm_adi_v5: let dap_lookup_cs_component() to get AP dbgbase
Simplify the code in cortex_a and aarch64 by moving the call to
dap_get_debugbase() inside dap_lookup_cs_component().
This has the further effects:
- dap_get_debugbase() is not referenced outside arm_adi_v5.c and
becomes static;
- dap_lookup_cs_component() looses one parameter;
- the coreid parameter 'idx' is passed as value;
- the caller in aarch64 don't have and don't print the irrelevant
value of AP register APID;
- fixes the debug message in the caller in aarch64 to print the
coreid value instead of always zero.
Change-Id: Ic7f0f643fdf067c059c8f2455a02ff18a3fed054
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6823
Tested-by: jenkins
Diffstat (limited to 'src/target/arm_adi_v5.h')
-rw-r--r-- | src/target/arm_adi_v5.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index 5c598f1..8c9a60f 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -619,10 +619,6 @@ int mem_ap_init(struct adiv5_ap *ap); /* Invalidate cached DP select and cached TAR and CSW of all APs */ void dap_invalidate_cache(struct adiv5_dap *dap); -/* Probe the AP for ROM Table location */ -int dap_get_debugbase(struct adiv5_ap *ap, - target_addr_t *dbgbase, uint32_t *apid); - /* Probe Access Ports to find a particular type */ int dap_find_ap(struct adiv5_dap *dap, enum ap_type type_to_find, @@ -641,7 +637,7 @@ static inline bool dap_is_multidrop(struct adiv5_dap *dap) /* Lookup CoreSight component */ int dap_lookup_cs_component(struct adiv5_ap *ap, - target_addr_t dbgbase, uint8_t type, target_addr_t *addr, int32_t *idx); + uint8_t type, target_addr_t *addr, int32_t idx); struct target; |