drivers: clock: get_pllsrc_frequency for stm32f2/f4/f7
The function get_pllsrc_frequency is added with possible source HSI or HSE. With STM32_PLL_P_ENABLED or STM32_PLL_Q_ENABLED, this function is used by the clock control driver. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
d1b80bf010
commit
388c36e5d6
|
@ -33,6 +33,22 @@ static uint32_t get_pll_source(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get the pll source frequency
|
||||
*/
|
||||
__unused
|
||||
uint32_t get_pllsrc_frequency(void)
|
||||
{
|
||||
if (IS_ENABLED(STM32_PLL_SRC_HSI)) {
|
||||
return STM32_HSI_FREQ;
|
||||
} else if (IS_ENABLED(STM32_PLL_SRC_HSE)) {
|
||||
return STM32_HSE_FREQ;
|
||||
}
|
||||
|
||||
__ASSERT(0, "Invalid source");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set up pll configuration
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue