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:
parent
14117b453d
commit
c99243c8ce
4 changed files with 11 additions and 2 deletions
|
@ -28,8 +28,7 @@
|
||||||
*/
|
*/
|
||||||
static inline uint64_t z_arm_dwt_freq_get(void)
|
static inline uint64_t z_arm_dwt_freq_get(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SOC_FAMILY_NORDIC_NRF) || \
|
#if defined(CONFIG_CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK)
|
||||||
defined(CONFIG_SOC_SERIES_IMXRT6XX)
|
|
||||||
/*
|
/*
|
||||||
* DWT frequency is taken directly from the
|
* DWT frequency is taken directly from the
|
||||||
* System Core clock (CPU) frequency, if the
|
* System Core clock (CPU) frequency, if the
|
||||||
|
|
|
@ -28,4 +28,9 @@ config CMSIS_M_CHECK_DEVICE_DEFINES
|
||||||
help
|
help
|
||||||
This options enables the validation of CMSIS configuration flags.
|
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
|
endif
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
config SOC_FAMILY_NORDIC_NRF
|
config SOC_FAMILY_NORDIC_NRF
|
||||||
select SOC_COMPATIBLE_NRF
|
select SOC_COMPATIBLE_NRF
|
||||||
select SOC_RESET_HOOK if ARM
|
select SOC_RESET_HOOK if ARM
|
||||||
|
select CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK if ARM
|
||||||
|
|
||||||
if SOC_FAMILY_NORDIC_NRF
|
if SOC_FAMILY_NORDIC_NRF
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
if SOC_SERIES_IMXRT6XX
|
if SOC_SERIES_IMXRT6XX
|
||||||
|
|
||||||
|
config CMSIS_CORE_HAS_SYSTEM_CORE_CLOCK
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
|
||||||
# alias for hal
|
# alias for hal
|
||||||
config SOC_SERIES_IMX_RT6XX
|
config SOC_SERIES_IMX_RT6XX
|
||||||
bool
|
bool
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue