From 1ebd6b579ef5bf143d0bc6b70097d344aa4102ff Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Fri, 10 Sep 2021 15:51:49 +0200 Subject: [PATCH] driver: clock: stm32 clock control supports ahb_prescaler This constraint on the AHB prescaler is removed. The ahb-prescaler is allow from 1-512. For stm32 common and stm32U5 devices. Signed-off-by: Francois Ramu --- drivers/clock_control/clock_stm32_ll_common.c | 11 ----------- drivers/clock_control/clock_stm32_ll_u5.c | 12 ------------ 2 files changed, 23 deletions(-) diff --git a/drivers/clock_control/clock_stm32_ll_common.c b/drivers/clock_control/clock_stm32_ll_common.c index ec8d97e6f2a..d15ae18ca51 100644 --- a/drivers/clock_control/clock_stm32_ll_common.c +++ b/drivers/clock_control/clock_stm32_ll_common.c @@ -64,17 +64,6 @@ #define STM32WL_DUAL_CORE #endif -#if STM32_AHB_PRESCALER > 1 -/* - * AHB prescaler allows to set a HCLK frequency (feeding cortex systick) - * lower than SYSCLK frequency (actual core frequency). - * Though, zephyr doesn't make a difference today between these two clocks. - * So, changing this prescaler is not allowed until it is made possible to - * use them independently in zephyr clock subsystem. - */ -#error "AHB prescaler can't be higher than 1" -#endif - /** * @brief fill in AHB/APB buses configuration structure */ diff --git a/drivers/clock_control/clock_stm32_ll_u5.c b/drivers/clock_control/clock_stm32_ll_u5.c index 58e9b4a3d7a..e396e016bac 100644 --- a/drivers/clock_control/clock_stm32_ll_u5.c +++ b/drivers/clock_control/clock_stm32_ll_u5.c @@ -30,18 +30,6 @@ #define z_apb3_prescaler(v) LL_RCC_APB3_DIV_ ## v #define apb3_prescaler(v) z_apb3_prescaler(v) - -#if STM32_AHB_PRESCALER > 1 -/* - * AHB prescaler allows to set a HCLK frequency (feeding cortex systick) - * lower than SYSCLK frequency (actual core frequency). - * Though, zephyr doesn't make a difference today between these two clocks. - * So, changing this prescaler is not allowed until it is made possible to - * use them independently in zephyr clock subsystem. - */ -#error "AHB prescaler can't be higher than 1" -#endif - #if STM32_SYSCLK_SRC_PLL /**