Skip to content

Commit d789d13

Browse files
alvsunkartben
authored andcommitted
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>
1 parent 35faf60 commit d789d13

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

boards/nuvoton/npcx4m8f_evb/npcx4m8f_evb_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ CONFIG_ARM_MPU=y
1616
# Clock configuration
1717
CONFIG_CLOCK_CONTROL=y
1818

19-
# General Kernel Options
20-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=15000000
21-
2219
# UART Driver
2320
CONFIG_SERIAL=y
2421
CONFIG_UART_INTERRUPT_DRIVEN=y

boards/nuvoton/npcx7m6fb_evb/npcx7m6fb_evb_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ CONFIG_NPCX_HEADER_SPI_READ_MODE_DUAL=y
1313
# Enable MPU
1414
CONFIG_ARM_MPU=y
1515

16-
# General Kernel Options
17-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=15000000
18-
1916
# Clock configuration
2017
CONFIG_CLOCK_CONTROL=y
2118

boards/nuvoton/npcx9m6f_evb/npcx9m6f_evb_defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ CONFIG_ARM_MPU=y
1616
# Clock configuration
1717
CONFIG_CLOCK_CONTROL=y
1818

19-
# General Kernel Options
20-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=15000000
21-
2219
# UART Driver
2320
CONFIG_SERIAL=y
2421
CONFIG_UART_INTERRUPT_DRIVEN=y

soc/nuvoton/npcx/npck3/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ config ESPI_TAF_NPCX
1515
default y
1616
depends on ESPI_TAF
1717

18+
config SYS_CLOCK_HW_CYCLES_PER_SEC
19+
default $(dt_nodelabel_int_prop,itims,clock-frequency)
20+
1821
endif # SOC_SERIES_NPCK3

soc/nuvoton/npcx/npcx4/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ config ESPI_TAF_NPCX
1515
default y
1616
depends on ESPI_TAF
1717

18+
config SYS_CLOCK_HW_CYCLES_PER_SEC
19+
default $(dt_nodelabel_int_prop,itims,clock-frequency)
20+
1821
endif # SOC_SERIES_NPCX4

soc/nuvoton/npcx/npcx7/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ config NUM_IRQS
1111
config CORTEX_M_SYSTICK
1212
default !NPCX_ITIM_TIMER
1313

14+
config SYS_CLOCK_HW_CYCLES_PER_SEC
15+
default $(dt_nodelabel_int_prop,itims,clock-frequency)
16+
1417
endif # SOC_SERIES_NPCX7

soc/nuvoton/npcx/npcx9/Kconfig.defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ config NUM_IRQS
1111
config CORTEX_M_SYSTICK
1212
default !NPCX_ITIM_TIMER
1313

14+
config SYS_CLOCK_HW_CYCLES_PER_SEC
15+
default $(dt_nodelabel_int_prop,itims,clock-frequency)
16+
1417
endif # SOC_SERIES_NPCX9

0 commit comments

Comments
 (0)