soc: nuvoton: npcx: update default SYS_CLOCK_HW_CYCLES_PER_SEC

Added support for deriving `SYS_CLOCK_HW_CYCLES_PER_SEC` from the
Device Tree by reading the `clock-frequency` property in the `itim` node.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
This commit is contained in:
Alvis Sun 2025-06-11 16:45:23 +08:00 committed by Benjamin Cabé
commit d789d13ec0
7 changed files with 12 additions and 9 deletions

View file

@ -16,9 +16,6 @@ CONFIG_ARM_MPU=y
# Clock configuration # Clock configuration
CONFIG_CLOCK_CONTROL=y CONFIG_CLOCK_CONTROL=y
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=15000000
# UART Driver # UART Driver
CONFIG_SERIAL=y CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_INTERRUPT_DRIVEN=y

View file

@ -13,9 +13,6 @@ CONFIG_NPCX_HEADER_SPI_READ_MODE_DUAL=y
# Enable MPU # Enable MPU
CONFIG_ARM_MPU=y CONFIG_ARM_MPU=y
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=15000000
# Clock configuration # Clock configuration
CONFIG_CLOCK_CONTROL=y CONFIG_CLOCK_CONTROL=y

View file

@ -16,9 +16,6 @@ CONFIG_ARM_MPU=y
# Clock configuration # Clock configuration
CONFIG_CLOCK_CONTROL=y CONFIG_CLOCK_CONTROL=y
# General Kernel Options
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=15000000
# UART Driver # UART Driver
CONFIG_SERIAL=y CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_INTERRUPT_DRIVEN=y

View file

@ -15,4 +15,7 @@ config ESPI_TAF_NPCX
default y default y
depends on ESPI_TAF depends on ESPI_TAF
config SYS_CLOCK_HW_CYCLES_PER_SEC
default $(dt_nodelabel_int_prop,itims,clock-frequency)
endif # SOC_SERIES_NPCK3 endif # SOC_SERIES_NPCK3

View file

@ -15,4 +15,7 @@ config ESPI_TAF_NPCX
default y default y
depends on ESPI_TAF depends on ESPI_TAF
config SYS_CLOCK_HW_CYCLES_PER_SEC
default $(dt_nodelabel_int_prop,itims,clock-frequency)
endif # SOC_SERIES_NPCX4 endif # SOC_SERIES_NPCX4

View file

@ -11,4 +11,7 @@ config NUM_IRQS
config CORTEX_M_SYSTICK config CORTEX_M_SYSTICK
default !NPCX_ITIM_TIMER default !NPCX_ITIM_TIMER
config SYS_CLOCK_HW_CYCLES_PER_SEC
default $(dt_nodelabel_int_prop,itims,clock-frequency)
endif # SOC_SERIES_NPCX7 endif # SOC_SERIES_NPCX7

View file

@ -11,4 +11,7 @@ config NUM_IRQS
config CORTEX_M_SYSTICK config CORTEX_M_SYSTICK
default !NPCX_ITIM_TIMER default !NPCX_ITIM_TIMER
config SYS_CLOCK_HW_CYCLES_PER_SEC
default $(dt_nodelabel_int_prop,itims,clock-frequency)
endif # SOC_SERIES_NPCX9 endif # SOC_SERIES_NPCX9