ADIv5: Abort Romtable scan also if CIDR0 is invalid after halting #832

STM32WLE5 has the same dual core chip as STM32WL5. For the second
core, the additional AP can be see, but access to e.g. CIDR0 for that
Romtable fails.
Aborting the scan too if again the second read of CIDR0 fails makes
sense anyways!
This commit is contained in:
Uwe Bonnes 2021-02-16 20:17:07 +01:00 committed by UweBonnes
parent d70fa8c7f6
commit 0df44e205b
1 changed files with 2 additions and 0 deletions

View File

@ -416,6 +416,8 @@ static void adiv5_component_probe(ADIv5_AP_t *ap, uint32_t addr, int recursion,
return; /* Halting failed! */
/* CPU now halted, read cidr again. */
cidr = adiv5_ap_read_id(ap, addr + CIDR0_OFFSET);
if ((cidr & ~CID_CLASS_MASK) != CID_PREAMBLE)
return;
}
}
#if defined(ENABLE_DEBUG)