arch: arm: cleanup of soc flags in arch

What is changed?

Use CMSIS SystemCoreClock via a dedicated flag instead of using
soc flags.

Why do we need this change?

This change is part of cleaning soc specific code out of arch folder.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
This commit is contained in:
Sudan Landge 2024-10-28 16:08:30 +00:00 committed by Anas Nashif
parent 14117b453d
commit c99243c8ce
4 changed files with 11 additions and 2 deletions

View File

@ -28,8 +28,7 @@
*/
static inline uint64_t z_arm_dwt_freq_get(void)
{
#if defined(CONFIG_SOC_FAMILY_NORDIC_NRF) || \
defined(CONFIG_SOC_SERIES_IMXRT6XX)
#if defined(CONFIG_CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK)
/*
* DWT frequency is taken directly from the
* System Core clock (CPU) frequency, if the

View File

@ -28,4 +28,9 @@ config CMSIS_M_CHECK_DEVICE_DEFINES
help
This options enables the validation of CMSIS configuration flags.
config CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK
bool
help
Enable this option if CMSIS SystemCoreClock symbols is available.
endif

View File

@ -9,6 +9,7 @@
config SOC_FAMILY_NORDIC_NRF
select SOC_COMPATIBLE_NRF
select SOC_RESET_HOOK if ARM
select CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK if ARM
if SOC_FAMILY_NORDIC_NRF

View File

@ -5,6 +5,10 @@
if SOC_SERIES_IMXRT6XX
config CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK
bool
default y
# alias for hal
config SOC_SERIES_IMX_RT6XX
bool