arm_adi_v5: replace dap_lookup_cs_component()

With the generic function for ROM table walk-through, reimplement
dap_lookup_cs_component().

Catch the code CORESIGHT_COMPONENT_FOUND and halt the search.
While there, drop two macros in arm_coresight.h, now unused.

Change-Id: I589ef7ae8a651d0c422ce7d0b4ed913713a8217e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6824
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2022-01-15 21:01:37 +01:00
parent 613f1c6abb
commit d74f11dcd4
2 changed files with 85 additions and 76 deletions

View File

@@ -48,9 +48,6 @@
#define ARM_CS_CLASS_0X1_ROM_TABLE (0x1)
#define ARM_CS_CLASS_0X9_CS_COMPONENT (0x9)
#define ARM_CS_CIDR1_CLASS_MASK (0x000000F0)
#define ARM_CS_CIDR1_CLASS_SHIFT (4)
static inline bool is_valid_arm_cs_cidr(uint32_t cidr)
{
return (cidr & ~ARM_CS_CIDR_CLASS_MASK) == 0xB105000D;