From 785ecf09911eb175096f8813c565c4a94b9dd95f Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Mon, 3 May 2021 21:19:40 +0200 Subject: [PATCH] drivers/clock_control: stm32f1: Deal with stm32f100xx devices According to RM0041.pdf clock tree for stm32f100xx devices is different from both STM32F10X density and connectivity lines devices, but is a combination of both. Rework symbols definitions so that STM32F100xx is neither of those and uses: - CLOCK_STM32_PLL_MULTIPLIER as on SOC_STM32F10X_DENSITY_DEVICE - CLOCK_STM32_PLL_PREDIV1 as on SOC_STM32F10X_CONNECTIVITY_LINE_... Signed-off-by: Erwan Gouriou --- drivers/clock_control/Kconfig.stm32f1 | 4 ++-- soc/arm/st_stm32/stm32f1/Kconfig.soc | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/clock_control/Kconfig.stm32f1 b/drivers/clock_control/Kconfig.stm32f1 index d5ec7e07749..5e8a9775e4c 100644 --- a/drivers/clock_control/Kconfig.stm32f1 +++ b/drivers/clock_control/Kconfig.stm32f1 @@ -15,7 +15,7 @@ config CLOCK_STM32_PLL_MULTIPLIER int "PLL multiplier" depends on CLOCK_STM32_SYSCLK_SRC_PLL default 9 - range 2 16 if SOC_STM32F10X_DENSITY_DEVICE + range 2 16 if !SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE range 4 9 if SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE help PLL multiplier, PLL output must not exceed 72MHz. Allowed values: @@ -24,7 +24,7 @@ config CLOCK_STM32_PLL_MULTIPLIER config CLOCK_STM32_PLL_PREDIV1 int "PREDIV1 Prescaler" - depends on SOC_STM32F10X_CONNECTIVITY_LINE_DEVICE && CLOCK_STM32_SYSCLK_SRC_PLL + depends on !SOC_STM32F10X_DENSITY_DEVICE && CLOCK_STM32_SYSCLK_SRC_PLL default 1 range 1 16 help diff --git a/soc/arm/st_stm32/stm32f1/Kconfig.soc b/soc/arm/st_stm32/stm32f1/Kconfig.soc index cd53bfa5a6e..46e9ff96c90 100644 --- a/soc/arm/st_stm32/stm32f1/Kconfig.soc +++ b/soc/arm/st_stm32/stm32f1/Kconfig.soc @@ -10,11 +10,9 @@ choice config SOC_STM32F100XB bool "STM32F100XB" - select SOC_STM32F10X_DENSITY_DEVICE config SOC_STM32F100XE bool "STM32F100XE" - select SOC_STM32F10X_DENSITY_DEVICE config SOC_STM32F103XE bool "STM32F103XE" @@ -41,6 +39,7 @@ endchoice config SOC_STM32F10X_DENSITY_DEVICE bool help + STM32F101xx, STM32F102xx, STM32F103xx: * Low density Value line devices * Medium density Value line devices * High density Value line devices