-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Soc arm cleanup systick #15212
Soc arm cleanup systick #15212
Conversation
All checks are passing now. Review history of this comment for details about previous failed status. |
88fd5cf
to
022e070
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable.
Maybe soc: arm: rename CPU_HAS_SYSTICK to CPU_CORTEX_M_HAS_SYSTICK
could mention why it was renamed in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason not to do this, but is SysTick such a weird default? I mean, it's architecturally specified and always present. Even nRF and SAM can use it even though they have alternatives they'd like to be default.
022e070
to
e082309
Compare
Will do, thanks. Done now @ulfalizer |
1f26fd4
to
a7ae2e6
Compare
a949ffe
to
0e25fdc
Compare
0e25fdc
to
522c2c0
Compare
CPU_CORTEX_M does not need to be selected by Kconfig symbols that already select a CORTEX_M variant. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
ARM SysTick timer is implemented by default in ARMv7-M and Mainline ARMv8-M processors, so we include the corresponding Kconfig symbol in arch/arm/core/cortex-M/Kconfig and remove the selections from the Cortex-M SOCs. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit renames the symbol CPU_HAS_SYSTICK to CPU_CORTEX_M_HAS_SYSTICK, to look similar to all other CPU_CORTEX_M_HAS_ options, and moves the K-config symbol definition from arm/core/Kconfig to arm/core/cortex_m/Kconfig. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
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>
522c2c0
to
46a530c
Compare
@carlescufi @galak @MaureenHelm, some help needed on this one - CI times-out continuously, due to the patch introducing changes in a relatively high number of platforms. |
The PR clean-up the inconsistencies with SysTick In ARM platforms:
CPU_HAS_SYSTICK
selection in ARCH for ARMv7-M and ARMv8-M Mainline architecturesCPU_CORTEX_M_HAS_SYSTICK
, to look similar to all otherCORTEX_M__HAS
options.In addition, the PR cleans up some left-out direct
CPU_CORTEX_M
Selections in ARM SOCs.The main reason for the patch (besides the obvious enhancement of clean-up) is to decouple HW capability options (CPU_HAS_) from system configuration.