drivers/clock_control: stm32 common: Don't disable fixed clocks
Each clock should be configured individually by device tree, don't disable them blindly. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
8594be2cb3
commit
d04802283b
7 changed files with 0 additions and 69 deletions
|
@ -463,18 +463,10 @@ int stm32_clock_control_init(const struct device *dev)
|
|||
/* Switch to PLL with MSI as clock source */
|
||||
LL_PLL_ConfigSystemClock_MSI(&s_PLLInitStruct, &s_ClkInitStruct);
|
||||
|
||||
/* Disable other clocks */
|
||||
LL_RCC_HSI_Disable();
|
||||
LL_RCC_HSE_Disable();
|
||||
|
||||
#elif STM32_PLL_SRC_HSI
|
||||
/* Switch to PLL with HSI as clock source */
|
||||
LL_PLL_ConfigSystemClock_HSI(&s_PLLInitStruct, &s_ClkInitStruct);
|
||||
|
||||
/* Disable other clocks */
|
||||
LL_RCC_HSE_Disable();
|
||||
LL_RCC_MSI_Disable();
|
||||
|
||||
#elif STM32_PLL_SRC_HSE
|
||||
|
||||
#ifndef CONFIG_SOC_SERIES_STM32WLX
|
||||
|
@ -504,10 +496,6 @@ int stm32_clock_control_init(const struct device *dev)
|
|||
&s_PLLInitStruct,
|
||||
&s_ClkInitStruct);
|
||||
|
||||
/* Disable other clocks */
|
||||
LL_RCC_HSI_Disable();
|
||||
LL_RCC_MSI_Disable();
|
||||
|
||||
#endif /* STM32_PLL_SRC_* */
|
||||
|
||||
#elif STM32_SYSCLK_SRC_HSE
|
||||
|
@ -594,11 +582,6 @@ int stm32_clock_control_init(const struct device *dev)
|
|||
LL_SetFlashLatency(new_flash_freq);
|
||||
}
|
||||
|
||||
/* Disable other clocks */
|
||||
LL_RCC_HSI_Disable();
|
||||
LL_RCC_MSI_Disable();
|
||||
LL_RCC_PLL_Disable();
|
||||
|
||||
#elif STM32_SYSCLK_SRC_MSI
|
||||
|
||||
old_flash_freq = RCC_CALC_FLASH_FREQ(HAL_RCC_GetSysClockFreq(),
|
||||
|
@ -677,11 +660,6 @@ int stm32_clock_control_init(const struct device *dev)
|
|||
LL_SetFlashLatency(new_flash_freq);
|
||||
}
|
||||
|
||||
/* Disable other clocks */
|
||||
LL_RCC_HSE_Disable();
|
||||
LL_RCC_HSI_Disable();
|
||||
LL_RCC_PLL_Disable();
|
||||
|
||||
#elif STM32_SYSCLK_SRC_HSI
|
||||
|
||||
stm32_clock_switch_to_hsi(hclk_prescaler);
|
||||
|
@ -710,10 +688,6 @@ int stm32_clock_control_init(const struct device *dev)
|
|||
/* HSI used as SYSCLK, set latency to 0 */
|
||||
LL_FLASH_SetLatency(LL_FLASH_LATENCY_0);
|
||||
|
||||
/* Disable other clocks */
|
||||
LL_RCC_HSE_Disable();
|
||||
LL_RCC_MSI_Disable();
|
||||
LL_RCC_PLL_Disable();
|
||||
|
||||
#endif /* STM32_SYSCLK_SRC_... */
|
||||
|
||||
|
|
|
@ -37,9 +37,6 @@ void config_pll_init(LL_UTILS_PLLInitTypeDef *pllinit);
|
|||
#endif /* STM32_SYSCLK_SRC_PLL */
|
||||
void config_enable_default_clocks(void);
|
||||
|
||||
/* Section for functions not available in every Cube packages */
|
||||
void LL_RCC_MSI_Disable(void);
|
||||
|
||||
/* function exported to the soc power.c */
|
||||
int stm32_clock_control_init(const struct device *dev);
|
||||
|
||||
|
|
|
@ -76,11 +76,3 @@ void config_enable_default_clocks(void)
|
|||
#endif
|
||||
#endif /* !CONFIG_SOC_SERIES_STM32F3X */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function kept for driver genericity
|
||||
*/
|
||||
void LL_RCC_MSI_Disable(void)
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
|
|
@ -98,11 +98,3 @@ void config_enable_default_clocks(void)
|
|||
{
|
||||
/* Nothing for now */
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function kept for driver genericity
|
||||
*/
|
||||
void LL_RCC_MSI_Disable(void)
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
|
|
@ -44,11 +44,3 @@ void config_enable_default_clocks(void)
|
|||
/* Power Interface clock enabled by default */
|
||||
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function kept for driver genericity
|
||||
*/
|
||||
void LL_RCC_MSI_Disable(void)
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
|
|
@ -45,11 +45,3 @@ void config_enable_default_clocks(void)
|
|||
/* Enable the power interface clock */
|
||||
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function kept for driver genericity
|
||||
*/
|
||||
void LL_RCC_MSI_Disable(void)
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
|
|
@ -67,11 +67,3 @@ void config_enable_default_clocks(void)
|
|||
LL_PWR_DisableBkUpAccess();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Function kept for driver genericity
|
||||
*/
|
||||
void LL_RCC_MSI_Disable(void)
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue