modules: cmsis: add core_ca inclusion for aarch32 Cortex-A SoCs

Add the inclusion of the Common Peripheral Access Layer for aarch32
Cortex-A SoCs in combination with the respective SoC's header file,
in which the feature flags evaluated in core_ca.h must be provided.

The corresponding CMSIS include path is added to the build by setting
the HAS_CMSIS_CORE_A Kconfig item for all aarch32 Cortex-A CPUs.

Signed-off-by: Immo Birnbaum <Immo.Birnbaum@Weidmueller.com>
This commit is contained in:
Immo Birnbaum 2021-09-02 17:15:30 +02:00 committed by Carles Cufí
parent 811d77a88a
commit ee7ac70c10
2 changed files with 18 additions and 0 deletions

View File

@ -24,10 +24,18 @@ extern "C" {
#define __CR_REV 0U
#endif
#ifndef __CA_REV
#define __CA_REV 0U
#endif
#ifndef __FPU_PRESENT
#define __FPU_PRESENT CONFIG_CPU_HAS_FPU
#endif
#ifndef __MMU_PRESENT
#define __MMU_PRESENT CONFIG_CPU_HAS_MMU
#endif
#ifdef __cplusplus
}
#endif
@ -38,6 +46,15 @@ extern "C" {
#include <core_cr5.h>
#elif defined(CONFIG_CPU_CORTEX_R7)
#include <core_cr7.h>
#elif defined(CONFIG_CPU_AARCH32_CORTEX_A)
/*
* Any defines relevant for the proper inclusion of CMSIS' Cortex-A
* Common Peripheral Access Layer (such as __CORTEX_A) which are not
* covered by the Kconfig-based default assignments above must be
* provided by each aarch32 Cortex-A SoC's header file (already in-
* cluded above).
*/
#include <core_ca.h>
#else
#error "Unknown device"
#endif

View File

@ -4,6 +4,7 @@
config HAS_CMSIS_CORE
bool
select HAS_CMSIS_CORE_A if CPU_CORTEX_A
select HAS_CMSIS_CORE_A if CPU_AARCH32_CORTEX_A
select HAS_CMSIS_CORE_R if CPU_CORTEX_R
select HAS_CMSIS_CORE_M if CPU_CORTEX_M