drivers: clock: n6: prevent clock configuration if NO_SEL is used
For STM32N6, when a device clock source is defined with NO_SEL, do not configure it. Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
committed by
Benjamin Cabé
parent
c712d1e817
commit
78fa4f0142
@@ -266,6 +266,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;
|
||||
}
|
||||
|
||||
sys_clear_bits(DT_REG_ADDR(DT_NODELABEL(rcc)) + STM32_DT_CLKSEL_REG_GET(pclken->enr),
|
||||
STM32_DT_CLKSEL_MASK_GET(pclken->enr) <<
|
||||
STM32_DT_CLKSEL_SHIFT_GET(pclken->enr));
|
||||
|
||||
Reference in New Issue
Block a user