drivers: clock_control: stm32h7: disable PLLs before configuration and guard for XIP #75655
+29
−0
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.
Extends #57337 to disable every PLL before configuration.
That allows an application to reconfigure PLLs after being configured by a bootloader.
At the same time, always disable PLLs to allow the bootloader to configure them after a restart.
However, we don't want to disable the PLL clock if it is used by (Q|O)SPI when
executing from external memory.
Fixes #75653 in a non-invasive way.
Overall. it is possible to implement complete clock reconfiguration of the
(Q|O)SPI when it runs from PLL(1|2) in XIP.
The RM0468 states that RCC
OCTOSPISEL
can be modified on the fly/at runtime.However, there are other open questions. Will (Q|O)SPI configured for PLL (by a bootloader)
work with external memory in all cases with reduced frequency (when switched to HCLK for some time)?
Moreover, the drivers will need to reconfigure the peripheral. For example, the prescaler requires
aborting memory map mode during execution from it. That and other aspects (sfdp read) will require
some refactoring.