Browse Source

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>
pull/81485/head
Sudan Landge 8 months ago committed by Anas Nashif
parent
commit
c99243c8ce
  1. 3
      arch/arm/core/cortex_m/timing.c
  2. 5
      modules/cmsis/Kconfig
  3. 1
      soc/nordic/Kconfig
  4. 4
      soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig

3
arch/arm/core/cortex_m/timing.c

@ -28,8 +28,7 @@ @@ -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

5
modules/cmsis/Kconfig

@ -28,4 +28,9 @@ config CMSIS_M_CHECK_DEVICE_DEFINES @@ -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

1
soc/nordic/Kconfig

@ -9,6 +9,7 @@ @@ -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

4
soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig

@ -5,6 +5,10 @@ @@ -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

Loading…
Cancel
Save