From 184a25769c2edfbbf1e4f14ffc570a80ea3fa8ea Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 8 Sep 2020 12:51:54 -0500 Subject: [PATCH] arm: systick: default CORTEX_M_SYSTICK based on dts Use setting from devicetree to drive the default setting for CORTEX_M_SYSTICK. We update the dts files to default systick to be enabled since the major of cortex-m platforms utilize it by default (except on Nordic SoCs, TI CC13x2/CC26x2 and MEC1501 in which we default to disabled). Fixes #25299 Signed-off-by: Kumar Gala --- drivers/timer/Kconfig | 7 +++++++ dts/arm/armv6-m.dtsi | 1 - dts/arm/armv7-m.dtsi | 1 - dts/arm/armv8-m.dtsi | 1 - dts/arm/microchip/mec1501hsz.dtsi | 4 ++++ dts/arm/nordic/nrf5340_cpuapp.dtsi | 4 ++++ dts/arm/nordic/nrf5340_cpuappns.dtsi | 4 ++++ dts/arm/nordic/nrf5340_cpunet.dtsi | 4 ++++ dts/arm/nordic/nrf5_common.dtsi | 4 ++++ dts/arm/nordic/nrf9160.dtsi | 4 ++++ dts/arm/nordic/nrf9160ns.dtsi | 4 ++++ dts/arm/ti/cc13x2_cc26x2.dtsi | 4 ++++ 12 files changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig index 5aac72dd10..bcd0735f75 100644 --- a/drivers/timer/Kconfig +++ b/drivers/timer/Kconfig @@ -120,9 +120,16 @@ config ARM_ARCH_TIMER timer which provides per-cpu timers attached to a GIC to deliver its per-processor interrupts via PPIs. +DT_COMPAT_ARM_V6M_SYSTICK := arm,armv6m-systick +DT_COMPAT_ARM_V7M_SYSTICK := arm,armv7m-systick +DT_COMPAT_ARM_V8M_SYSTICK := arm,armv8m-systick + config CORTEX_M_SYSTICK bool "Cortex-M SYSTICK timer" depends on CPU_CORTEX_M_HAS_SYSTICK + default $(dt_compat_enabled,$(DT_COMPAT_ARM_V6M_SYSTICK)) || \ + $(dt_compat_enabled,$(DT_COMPAT_ARM_V7M_SYSTICK)) || \ + $(dt_compat_enabled,$(DT_COMPAT_ARM_V8M_SYSTICK)) select TICKLESS_CAPABLE help This module implements a kernel device driver for the Cortex-M processor diff --git a/dts/arm/armv6-m.dtsi b/dts/arm/armv6-m.dtsi index 27f8c0ae00..ccdf24261b 100644 --- a/dts/arm/armv6-m.dtsi +++ b/dts/arm/armv6-m.dtsi @@ -20,7 +20,6 @@ systick: timer@e000e010 { compatible = "arm,armv6m-systick"; reg = <0xe000e010 0x10>; - status = "disabled"; }; }; }; diff --git a/dts/arm/armv7-m.dtsi b/dts/arm/armv7-m.dtsi index 5e2d92a0a7..cd244f4594 100644 --- a/dts/arm/armv7-m.dtsi +++ b/dts/arm/armv7-m.dtsi @@ -20,7 +20,6 @@ systick: timer@e000e010 { compatible = "arm,armv7m-systick"; reg = <0xe000e010 0x10>; - status = "disabled"; }; }; }; diff --git a/dts/arm/armv8-m.dtsi b/dts/arm/armv8-m.dtsi index 7b3b73e410..da5561d873 100644 --- a/dts/arm/armv8-m.dtsi +++ b/dts/arm/armv8-m.dtsi @@ -20,7 +20,6 @@ systick: timer@e000e010 { compatible = "arm,armv8m-systick"; reg = <0xe000e010 0x10>; - status = "disabled"; }; }; }; diff --git a/dts/arm/microchip/mec1501hsz.dtsi b/dts/arm/microchip/mec1501hsz.dtsi index 78b167767c..93382e7622 100644 --- a/dts/arm/microchip/mec1501hsz.dtsi +++ b/dts/arm/microchip/mec1501hsz.dtsi @@ -424,3 +424,7 @@ &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + status = "disabled"; +}; diff --git a/dts/arm/nordic/nrf5340_cpuapp.dtsi b/dts/arm/nordic/nrf5340_cpuapp.dtsi index 49e6448ea4..47ae15f173 100644 --- a/dts/arm/nordic/nrf5340_cpuapp.dtsi +++ b/dts/arm/nordic/nrf5340_cpuapp.dtsi @@ -95,3 +95,7 @@ &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + status = "disabled"; +}; diff --git a/dts/arm/nordic/nrf5340_cpuappns.dtsi b/dts/arm/nordic/nrf5340_cpuappns.dtsi index 0e825efd08..e3457010e9 100644 --- a/dts/arm/nordic/nrf5340_cpuappns.dtsi +++ b/dts/arm/nordic/nrf5340_cpuappns.dtsi @@ -63,3 +63,7 @@ &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + status = "disabled"; +}; diff --git a/dts/arm/nordic/nrf5340_cpunet.dtsi b/dts/arm/nordic/nrf5340_cpunet.dtsi index 35669a3d54..fbe5dfaca8 100644 --- a/dts/arm/nordic/nrf5340_cpunet.dtsi +++ b/dts/arm/nordic/nrf5340_cpunet.dtsi @@ -248,3 +248,7 @@ &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + status = "disabled"; +}; diff --git a/dts/arm/nordic/nrf5_common.dtsi b/dts/arm/nordic/nrf5_common.dtsi index 35b73258d0..d94da78077 100644 --- a/dts/arm/nordic/nrf5_common.dtsi +++ b/dts/arm/nordic/nrf5_common.dtsi @@ -8,3 +8,7 @@ label = "SW_PWM"; }; }; + +&systick { + status = "disabled"; +}; diff --git a/dts/arm/nordic/nrf9160.dtsi b/dts/arm/nordic/nrf9160.dtsi index 62e1e159fc..eb7f2bf3d9 100644 --- a/dts/arm/nordic/nrf9160.dtsi +++ b/dts/arm/nordic/nrf9160.dtsi @@ -94,3 +94,7 @@ &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + status = "disabled"; +}; diff --git a/dts/arm/nordic/nrf9160ns.dtsi b/dts/arm/nordic/nrf9160ns.dtsi index b343ea67e7..4d16aa32ff 100644 --- a/dts/arm/nordic/nrf9160ns.dtsi +++ b/dts/arm/nordic/nrf9160ns.dtsi @@ -60,3 +60,7 @@ &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + status = "disabled"; +}; diff --git a/dts/arm/ti/cc13x2_cc26x2.dtsi b/dts/arm/ti/cc13x2_cc26x2.dtsi index e09f9b7db4..ae3c16a5be 100644 --- a/dts/arm/ti/cc13x2_cc26x2.dtsi +++ b/dts/arm/ti/cc13x2_cc26x2.dtsi @@ -131,3 +131,7 @@ &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + status = "disabled"; +};