Skip to content
Permalink
Browse files

soc: arm: remove default selection of system timer for ARM platforms

We shall not enable by default a system timer in ARM
platforms, namely the SysTick, the Nordic, or the SAM0
RTC timer, simply by assessing the hardware capabilities
(e.g. by conditioning on CPU_CORTEX_M_HAS_SYSTICK).
Instead, now, all ARM platforms needs to explicitly set
their system timer module. Note that this has already
been the case for ca 80% of the ARM platforms.

This clean-up allows us to decouple HW capabilities from
system configuration (for example, Nordic platforms may
enable option CPU_CORTEX_M_HAS_SYSTICK, and still use
the platform-specific RTC timer for system timing).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information...
ioannisg authored and galak committed Apr 5, 2019
1 parent 894eca5 commit 236c5ac28fa2329a5119d7268e1c991f20d19df3
Showing with 26 additions and 2 deletions.
  1. +2 −0 boards/arm/96b_carbon/96b_carbon_defconfig
  2. +1 −0 boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez_defconfig
  3. +1 −0 boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32_defconfig
  4. +1 −0 boards/arm/nucleo_f207zg/nucleo_f207zg_defconfig
  5. +1 −0 boards/arm/nucleo_f302r8/nucleo_f302r8_defconfig
  6. +1 −0 boards/arm/nucleo_f401re/nucleo_f401re_defconfig
  7. +1 −0 boards/arm/nucleo_f411re/nucleo_f411re_defconfig
  8. +1 −0 boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig
  9. +1 −0 boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig
  10. +1 −0 boards/arm/nucleo_f429zi/nucleo_f429zi_defconfig
  11. +1 −0 boards/arm/nucleo_f446re/nucleo_f446re_defconfig
  12. +1 −0 boards/arm/nucleo_f746zg/nucleo_f746zg_defconfig
  13. +1 −0 boards/arm/nucleo_f756zg/nucleo_f756zg_defconfig
  14. +1 −0 boards/arm/olimex_stm32_e407/olimex_stm32_e407_defconfig
  15. +1 −0 boards/arm/olimex_stm32_h407/olimex_stm32_h407_defconfig
  16. +1 −0 boards/arm/olimex_stm32_p405/olimex_stm32_p405_defconfig
  17. +1 −0 boards/arm/stm32f3_disco/stm32f3_disco_defconfig
  18. +1 −0 boards/arm/stm32f411e_disco/stm32f411e_disco_defconfig
  19. +1 −0 boards/arm/stm32f412g_disco/stm32f412g_disco_defconfig
  20. +1 −0 boards/arm/stm32f429i_disc1/stm32f429i_disc1_defconfig
  21. +1 −0 boards/arm/stm32f469i_disco/stm32f469i_disco_defconfig
  22. +1 −0 boards/arm/stm32f4_disco/stm32f4_disco_defconfig
  23. +1 −0 boards/arm/stm32f723e_disco/stm32f723e_disco_defconfig
  24. +1 −0 boards/arm/stm32f746g_disco/stm32f746g_disco_defconfig
  25. +1 −0 boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig
  26. +0 −2 drivers/timer/Kconfig
@@ -3,6 +3,8 @@
CONFIG_ARM=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F401XE=y
CONFIG_CORTEX_M_SYSTICK=y

# 84MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_96B_STM32_SENSOR_MEZ=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F446XE=y
CONFIG_CORTEX_M_SYSTICK=y

# 84MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
@@ -3,6 +3,7 @@ CONFIG_BOARD_MIKROE_MINI_M4_FOR_STM32=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F415RG=y
# 168MHz system clock
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F207ZG=y
CONFIG_SOC_SERIES_STM32F2X=y
CONFIG_SOC_STM32F207XG=y
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

@@ -3,6 +3,7 @@
CONFIG_ARM=y
CONFIG_SOC_SERIES_STM32F3X=y
CONFIG_SOC_STM32F302X8=y
CONFIG_CORTEX_M_SYSTICK=y
# 72 MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F401RE=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F401XE=y
CONFIG_CORTEX_M_SYSTICK=y
# 84MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F411RE=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F411XE=y
CONFIG_CORTEX_M_SYSTICK=y
# 96MHz system clock (highest value to get a precise USB clock)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F412ZG=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F412ZG=y
CONFIG_CORTEX_M_SYSTICK=y
# 96MHz system clock (highest value to get a precise USB clock)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F413ZH=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F413XX=y
CONFIG_CORTEX_M_SYSTICK=y
# 96MHz system clock (highest value to get a precise USB clock)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -3,6 +3,7 @@
CONFIG_ARM=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F429XI=y
CONFIG_CORTEX_M_SYSTICK=y
# 168MHz system clock (highest value to get a precise USB clock)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F446RE=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F446XE=y
CONFIG_CORTEX_M_SYSTICK=y
# 96MHz system clock (highest value to get a precise USB clock)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F746ZG=y
CONFIG_SOC_SERIES_STM32F7X=y
CONFIG_SOC_STM32F746XG=y
CONFIG_CORTEX_M_SYSTICK=y
# 72MHz system clock (CubeMX Defaults)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_NUCLEO_F756ZG=y
CONFIG_SOC_SERIES_STM32F7X=y
CONFIG_SOC_STM32F756XX=y
CONFIG_CORTEX_M_SYSTICK=y
# 72MHz system clock (CubeMX Defaults)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_OLIMEX_STM32_E407=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F407XG=y
CONFIG_CORTEX_M_SYSTICK=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_OLIMEX_STM32_H407=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F407XG=y
CONFIG_CORTEX_M_SYSTICK=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_OLIMEX_STM32_P405=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F405XG=y
CONFIG_CORTEX_M_SYSTICK=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F3_DISCO=y
CONFIG_SOC_SERIES_STM32F3X=y
CONFIG_SOC_STM32F303XC=y
CONFIG_CORTEX_M_SYSTICK=y
# 72MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F411E_DISCO=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F411XE=y
CONFIG_CORTEX_M_SYSTICK=y
# 100MHz system clock (highest value to get a precise USB clock should be 96MHz)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=100000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F412G_DISCO=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F412ZG=y
CONFIG_CORTEX_M_SYSTICK=y
# 100MHz system clock (highest value to get a precise USB clock should be 96MHz)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=100000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F429I_DISC1=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F429XI=y
CONFIG_CORTEX_M_SYSTICK=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F469I_DISCO=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F469XI=y
CONFIG_CORTEX_M_SYSTICK=y
# 180MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=180000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F4_DISCO=y
CONFIG_SOC_SERIES_STM32F4X=y
CONFIG_SOC_STM32F407XG=y
CONFIG_CORTEX_M_SYSTICK=y
# 168MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=168000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F723E_DISCO=y
CONFIG_SOC_SERIES_STM32F7X=y
CONFIG_SOC_STM32F723XE=y
CONFIG_CORTEX_M_SYSTICK=y
# 216MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F746G_DISCO=y
CONFIG_SOC_SERIES_STM32F7X=y
CONFIG_SOC_STM32F746XG=y
CONFIG_CORTEX_M_SYSTICK=y
# 216MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -4,6 +4,7 @@ CONFIG_ARM=y
CONFIG_BOARD_STM32F769I_DISCO=y
CONFIG_SOC_SERIES_STM32F7X=y
CONFIG_SOC_STM32F769XI=y
CONFIG_CORTEX_M_SYSTICK=y
# 216MHz system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
@@ -91,7 +91,6 @@ config ARCV2_TIMER_IRQ_PRIORITY

config CORTEX_M_SYSTICK
bool "Cortex-M SYSTICK timer"
default y
depends on CPU_CORTEX_M_HAS_SYSTICK
select TICKLESS_CAPABLE
help
@@ -110,7 +109,6 @@ config ALTERA_AVALON_TIMER

config NRF_RTC_TIMER
bool "nRF Real Time Counter (NRF_RTC1) Timer"
default y
depends on CLOCK_CONTROL
depends on SOC_COMPATIBLE_NRF
select TICKLESS_CAPABLE

0 comments on commit 236c5ac

Please sign in to comment.
You can’t perform that action at this time.