boards/stm32: cpu/stm32: move clock configuration from boards to cpu#15273
Merged
benpicco merged 5 commits intoRIOT-OS:masterfrom Oct 27, 2020
Merged
boards/stm32: cpu/stm32: move clock configuration from boards to cpu#15273benpicco merged 5 commits intoRIOT-OS:masterfrom
benpicco merged 5 commits intoRIOT-OS:masterfrom
Conversation
41 tasks
ac67e6a to
85f4d60
Compare
85f4d60 to
57612f8
Compare
Contributor
Author
|
rebased and adapted after #15192 got merged. |
benpicco
reviewed
Oct 26, 2020
Contributor
benpicco
left a comment
There was a problem hiding this comment.
Nice cleanup, no code changes.
Just two naming suggestions.
57612f8 to
39e06ba
Compare
benpicco
approved these changes
Oct 27, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR moves all STM32 clock configurations located in
boards/common/stm32/includeto a new directory incpu/stm32/include/clk.A new generic
clk_conf.hheader is introduced to automatically include the clock configuration of a given family. This simplifies theperiph_conf.hheader at board level. I also looked at a way to completely remove this include fromperiph_conf.hbut couldn't come up to working solution (due includes order and redefined constants).The L4 max core clock define is also moved from the boards to L4 clock configuration and is determined based on the families/lines. This is cleaner and much more generic.
Some more factorization of the clock configurations themselves could be done but I prefer to keep that to follow-up PRs (and will update #14975 accordingly).
Testing procedure
This PR is only moving code around so I think a green Murdock should be enough.
Issues/PRs references
Another item ticked in #14975