soc: atmel_sam: set SYS_CLOCK_HW_CYCLES_PER_SEC from DT
Set the defalut value of SYS_CLOCK_HW_CYCLES_PER_SEC Kconfig option from the Device Tree. The `clock-frequency` property of the DT cpu@0 node is a single source of truth defining the CPU frequency. This is the value used e.g. by all Atmel drivers. For Atmel SAM family CPU clock is currently the only supported system clock source. Ensure that kernel understanding of the hardware clock frequency is the correct one. Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
parent
ef3c8507a6
commit
471d5ea474
|
@ -5,7 +5,6 @@ CONFIG_SOC_PART_NUMBER_SAME70Q21=y
|
|||
CONFIG_SOC_ATMEL_SAME70_EXT_MAINCK=y
|
||||
CONFIG_SOC_ATMEL_SAME70_PLLA_MULA=24
|
||||
CONFIG_SOC_ATMEL_SAME70_PLLA_DIVA=1
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=300000000
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
CONFIG_CONSOLE=y
|
||||
|
|
|
@ -5,7 +5,6 @@ CONFIG_SOC_PART_NUMBER_SAME70Q21B=y
|
|||
CONFIG_SOC_ATMEL_SAME70_EXT_MAINCK=y
|
||||
CONFIG_SOC_ATMEL_SAME70_PLLA_MULA=24
|
||||
CONFIG_SOC_ATMEL_SAME70_PLLA_DIVA=1
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=300000000
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
CONFIG_CONSOLE=y
|
||||
|
|
|
@ -5,7 +5,6 @@ CONFIG_SOC_PART_NUMBER_SAMV71Q21=y
|
|||
CONFIG_SOC_ATMEL_SAMV71_EXT_MAINCK=y
|
||||
CONFIG_SOC_ATMEL_SAMV71_PLLA_MULA=24
|
||||
CONFIG_SOC_ATMEL_SAMV71_PLLA_DIVA=1
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=300000000
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
CONFIG_CONSOLE=y
|
||||
|
|
|
@ -5,7 +5,6 @@ CONFIG_SOC_PART_NUMBER_SAMV71Q21B=y
|
|||
CONFIG_SOC_ATMEL_SAMV71_EXT_MAINCK=y
|
||||
CONFIG_SOC_ATMEL_SAMV71_PLLA_MULA=24
|
||||
CONFIG_SOC_ATMEL_SAMV71_PLLA_DIVA=1
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=300000000
|
||||
CONFIG_ARM_MPU=y
|
||||
CONFIG_CORTEX_M_SYSTICK=y
|
||||
CONFIG_CONSOLE=y
|
||||
|
|
|
@ -5,6 +5,12 @@
|
|||
|
||||
source "soc/arm/atmel_sam/*/Kconfig.defconfig.series"
|
||||
|
||||
if SOC_FAMILY_SAM
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
|
||||
|
||||
config WATCHDOG
|
||||
default y
|
||||
depends on SOC_FAMILY_SAM
|
||||
|
||||
endif # SOC_FAMILY_SAM
|
||||
|
|
|
@ -24,7 +24,4 @@ config SOC_PART_NUMBER
|
|||
config NUM_IRQS
|
||||
default 45
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 84000000
|
||||
|
||||
endif # SOC_SERIES_SAM3X
|
||||
|
|
|
@ -23,9 +23,6 @@ config SOC_PART_NUMBER
|
|||
config NUM_IRQS
|
||||
default 47
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 120000000
|
||||
|
||||
config GPIO_SAM
|
||||
default y
|
||||
depends on GPIO
|
||||
|
|
|
@ -33,9 +33,6 @@ config SOC_PART_NUMBER
|
|||
config NUM_IRQS
|
||||
default 80
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 48000000
|
||||
|
||||
# Configure default device drivers. If a feature is supported by more than one
|
||||
# device driver the default configuration will be placed in the board defconfig
|
||||
# file.
|
||||
|
|
|
@ -28,9 +28,6 @@ config SOC_PART_NUMBER
|
|||
config NUM_IRQS
|
||||
default 35
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 120000000
|
||||
|
||||
config GPIO_SAM
|
||||
default y
|
||||
depends on GPIO
|
||||
|
|
|
@ -37,9 +37,6 @@ config NUM_IRQS
|
|||
default 74 if SOC_ATMEL_SAME70_REVB
|
||||
default 71
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 300000000
|
||||
|
||||
# Configure default device drivers. If a feature is supported by more than one
|
||||
# device driver the default configuration will be placed in the board defconfig
|
||||
# file.
|
||||
|
|
|
@ -38,9 +38,6 @@ config NUM_IRQS
|
|||
default 74 if SOC_ATMEL_SAMV71_REVB
|
||||
default 71
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 300000000
|
||||
|
||||
# Configure default device drivers. If a feature is supported by more than one
|
||||
# device driver the default configuration will be placed in the board defconfig
|
||||
# file.
|
||||
|
|
Loading…
Reference in a new issue