Skip to content

Commit 24c584d

Browse files
hfruchet-stkartben
authored andcommitted
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 <[email protected]>
1 parent 0501e7a commit 24c584d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/clock_control/clock_stm32_ll_h7.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ static int stm32_clock_control_configure(const struct device *dev,
406406
return err;
407407
}
408408

409+
if (pclken->enr == NO_SEL) {
410+
/* Domain clock is fixed. Nothing to set. Exit */
411+
return 0;
412+
}
413+
409414
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
410415

411416
sys_clear_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + STM32_DT_CLKSEL_REG_GET(pclken->enr),

0 commit comments

Comments
 (0)