drivers/clock_control: stm32h7_m4: Don't rely on rcc "clocks" property
In prts of the code, we use rcc node "clocks" property to testify the use of device tree for clocks configuration. This doesn't work in case of stm32h7 m4 targets as for those, "upstream rcc" clock configuration, such as sysclk source selection, is done on m7 core and hence rcc node doesn't have a "clocks" property. To work around this, use alternate "d1cpre" property in case of stm32h7 targets. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
05b7476664
commit
edaeef1cea
@ -44,7 +44,7 @@ config CLOCK_STM32_HSE_CLOCK
|
||||
|
||||
config CLOCK_CONTROL_STM32_HAS_DTS
|
||||
bool
|
||||
default y if "$(dt_node_has_prop,rcc,clocks)"
|
||||
default y if "$(dt_node_has_prop,rcc,clocks)" || "$(dt_node_has_prop,rcc,d1cpre)"
|
||||
help
|
||||
This symbol is added to prevent default use of CLOCK_CONTROL_STM32_* symbols
|
||||
when board make use of device tree to configure clocks.
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(rcc), st_stm32h7_rcc, okay) && \
|
||||
DT_NODE_HAS_PROP(DT_NODELABEL(rcc), clocks)
|
||||
DT_NODE_HAS_PROP(DT_NODELABEL(rcc), d1cpre)
|
||||
#define STM32_D1CPRE DT_PROP(DT_NODELABEL(rcc), d1cpre)
|
||||
#define STM32_HPRE DT_PROP(DT_NODELABEL(rcc), hpre)
|
||||
#define STM32_D2PPRE1 DT_PROP(DT_NODELABEL(rcc), d2ppre1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user