soc: silabs: Derive SYS_CLOCK_HW_CYCLES_PER_SEC from DT

On Series 2, set the SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig option from
DeviceTree, rather than separately configuring it in board-level
defconfig.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
This commit is contained in:
Aksel Skauge Mellbye 2024-10-09 14:18:09 +02:00 committed by Henrik Brix Andersen
commit 046766573d
7 changed files with 9 additions and 12 deletions

View file

@ -2,3 +2,11 @@
# SPDX-License-Identifier: Apache-2.0
rsource "*/Kconfig.defconfig"
if SOC_FAMILY_SILABS_S2
config SYS_CLOCK_HW_CYCLES_PER_SEC
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) if CORTEX_M_SYSTICK
default 32768
endif