drivers: clock: stm32: h7: fixed domain clock configuration

In some case, we may need to describe a domain clock for a device
while there is no way to configure it.

Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
This commit is contained in:
Hugues Fruchet 2025-04-16 16:41:21 +02:00 committed by Benjamin Cabé
commit 24c584d2a4

View file

@ -406,6 +406,11 @@ static int stm32_clock_control_configure(const struct device *dev,
return err;
}
if (pclken->enr == NO_SEL) {
/* Domain clock is fixed. Nothing to set. Exit */
return 0;
}
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
sys_clear_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + STM32_DT_CLKSEL_REG_GET(pclken->enr),