soc: nordic: Use proper devicetree entries for clock frequency
Sets the SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig from devicetree entries. Also fixes invalid configuration on nrf54h20 whereby it attempts to take the clock frequency from a peripheral that does not exist Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
dd99eda025
commit
270f5d6771
8 changed files with 21 additions and 8 deletions
|
@ -13,10 +13,6 @@ rsource "*/Kconfig.defconfig"
|
|||
config CLOCK_CONTROL
|
||||
default y if SYS_CLOCK_EXISTS && !NRF_PLATFORM_HALTIUM && !RISCV_CORE_NORDIC_VPR
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 1000000 if NRF_GRTC_TIMER
|
||||
default 32768
|
||||
|
||||
config SYS_CLOCK_TICKS_PER_SEC
|
||||
default 128 if !TICKLESS_KERNEL
|
||||
default 31250 if NRF_GRTC_TIMER
|
||||
|
|
|
@ -13,4 +13,7 @@ config NUM_IRQS
|
|||
config NRF_RTC_TIMER
|
||||
default y if SYS_CLOCK_EXISTS
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_nodelabel_int_prop,rtc1,clock-frequency)
|
||||
|
||||
endif # SOC_SERIES_NRF51X
|
||||
|
|
|
@ -11,4 +11,7 @@ rsource "Kconfig.defconfig.nrf52*"
|
|||
config NRF_RTC_TIMER
|
||||
default y if SYS_CLOCK_EXISTS
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_nodelabel_int_prop,rtc1,clock-frequency)
|
||||
|
||||
endif # SOC_SERIES_NRF52X
|
||||
|
|
|
@ -11,4 +11,7 @@ rsource "Kconfig.defconfig.nrf53*"
|
|||
config NRF_RTC_TIMER
|
||||
default y if SYS_CLOCK_EXISTS
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_nodelabel_int_prop,rtc1,clock-frequency)
|
||||
|
||||
endif # SOC_SERIES_NRF53X
|
||||
|
|
|
@ -27,10 +27,6 @@ config BUILD_OUTPUT_ADJUST_LMA
|
|||
config BUILD_OUTPUT_HEX
|
||||
default y
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 1000000 if NRF_GRTC_TIMER
|
||||
default 32768 if NRF_RTC_TIMER
|
||||
|
||||
endif # RISCV
|
||||
|
||||
config SPI_DW_HSSI
|
||||
|
@ -45,4 +41,7 @@ config PM_DEVICE_POWER_DOMAIN
|
|||
config PM_DEVICE_RUNTIME
|
||||
default y if PM_DEVICE
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_nodelabel_int_prop,grtc,clock-frequency) if NRF_GRTC_TIMER
|
||||
|
||||
endif # SOC_SERIES_NRF54HX
|
||||
|
|
|
@ -46,4 +46,7 @@ config BUILD_OUTPUT_ADJUST_LMA
|
|||
|
||||
endif # RISCV
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_nodelabel_int_prop,grtc,clock-frequency) if NRF_GRTC_TIMER
|
||||
|
||||
endif # SOC_SERIES_NRF54LX
|
||||
|
|
|
@ -11,4 +11,7 @@ rsource "Kconfig.defconfig.nrf91*"
|
|||
config NRF_RTC_TIMER
|
||||
default y if SYS_CLOCK_EXISTS
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_nodelabel_int_prop,rtc1,clock-frequency)
|
||||
|
||||
endif # SOC_SERIES_NRF91X
|
||||
|
|
|
@ -38,4 +38,7 @@ config SPI_DW_HSSI
|
|||
config SPI_DW_ACCESS_WORD_ONLY
|
||||
default y if SPI_DW
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_nodelabel_int_prop,grtc,clock-frequency) if NRF_GRTC_TIMER
|
||||
|
||||
endif # SOC_SERIES_NRF92X
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue