diff --git a/arch/arm/src/stm32l4/stm32l4x3xx_rcc.c b/arch/arm/src/stm32l4/stm32l4x3xx_rcc.c index 88265af5016..9790370bdc1 100644 --- a/arch/arm/src/stm32l4/stm32l4x3xx_rcc.c +++ b/arch/arm/src/stm32l4/stm32l4x3xx_rcc.c @@ -46,10 +46,6 @@ #define HSIRDY_TIMEOUT HSERDY_TIMEOUT #define MSIRDY_TIMEOUT HSERDY_TIMEOUT -/* HSE divisor to yield ~1MHz RTC clock */ - -#define HSE_DIVISOR (STM32L4_HSE_FREQUENCY + 500000) / 1000000 - /* Determine if board wants to use HSI48 as 48 MHz oscillator. */ #if defined(CONFIG_STM32L4_HAVE_HSI48) && defined(STM32L4_USE_CLK48) @@ -730,15 +726,6 @@ static void stm32l4_stdclockconfig(void) regval |= STM32L4_RCC_CFGR_PPRE1; putreg32(regval, STM32L4_RCC_CFGR); -#ifdef CONFIG_STM32L4_RTC_HSECLOCK - /* Set the RTC clock divisor */ - - regval = getreg32(STM32L4_RCC_CFGR); - regval &= ~RCC_CFGR_RTCPRE_MASK; - regval |= RCC_CFGR_RTCPRE(HSE_DIVISOR); - putreg32(regval, STM32L4_RCC_CFGR); -#endif - /* Set the PLL source and main divider */ regval = getreg32(STM32L4_RCC_PLLCFG); diff --git a/arch/arm/src/stm32l4/stm32l4x5xx_rcc.c b/arch/arm/src/stm32l4/stm32l4x5xx_rcc.c index 8b2178ebf82..2c9b4de3f4c 100644 --- a/arch/arm/src/stm32l4/stm32l4x5xx_rcc.c +++ b/arch/arm/src/stm32l4/stm32l4x5xx_rcc.c @@ -45,10 +45,6 @@ #define HSIRDY_TIMEOUT HSERDY_TIMEOUT #define MSIRDY_TIMEOUT HSERDY_TIMEOUT -/* HSE divisor to yield ~1MHz RTC clock */ - -#define HSE_DIVISOR (STM32L4_HSE_FREQUENCY + 500000) / 1000000 - /**************************************************************************** * Private Data ****************************************************************************/ @@ -721,15 +717,6 @@ static void stm32l4_stdclockconfig(void) regval |= STM32L4_RCC_CFGR_PPRE1; putreg32(regval, STM32L4_RCC_CFGR); -#ifdef CONFIG_STM32L4_RTC_HSECLOCK - /* Set the RTC clock divisor */ - - regval = getreg32(STM32L4_RCC_CFGR); - regval &= ~RCC_CFGR_RTCPRE_MASK; - regval |= RCC_CFGR_RTCPRE(HSE_DIVISOR); - putreg32(regval, STM32L4_RCC_CFGR); -#endif - /* Set the PLL source and main divider */ regval = getreg32(STM32L4_RCC_PLLCFG); diff --git a/arch/arm/src/stm32l4/stm32l4x6xx_rcc.c b/arch/arm/src/stm32l4/stm32l4x6xx_rcc.c index 2120c65efa4..57f0d310b6e 100644 --- a/arch/arm/src/stm32l4/stm32l4x6xx_rcc.c +++ b/arch/arm/src/stm32l4/stm32l4x6xx_rcc.c @@ -46,10 +46,6 @@ #define HSIRDY_TIMEOUT HSERDY_TIMEOUT #define MSIRDY_TIMEOUT HSERDY_TIMEOUT -/* HSE divisor to yield ~1MHz RTC clock */ - -#define HSE_DIVISOR (STM32L4_HSE_FREQUENCY + 500000) / 1000000 - /* Determine if board wants to use HSI48 as 48 MHz oscillator. */ #if defined(CONFIG_STM32L4_HAVE_HSI48) && defined(STM32L4_USE_CLK48) @@ -838,15 +834,6 @@ static void stm32l4_stdclockconfig(void) regval |= STM32L4_RCC_CFGR_PPRE1; putreg32(regval, STM32L4_RCC_CFGR); -#ifdef CONFIG_STM32L4_RTC_HSECLOCK - /* Set the RTC clock divisor */ - - regval = getreg32(STM32L4_RCC_CFGR); - regval &= ~RCC_CFGR_RTCPRE_MASK; - regval |= RCC_CFGR_RTCPRE(HSE_DIVISOR); - putreg32(regval, STM32L4_RCC_CFGR); -#endif - #ifndef STM32L4_BOARD_NOPLL /* Set the PLL source and main divider */ diff --git a/arch/arm/src/stm32l4/stm32l4xrxx_rcc.c b/arch/arm/src/stm32l4/stm32l4xrxx_rcc.c index 027ac9b2575..11b6e7d0838 100644 --- a/arch/arm/src/stm32l4/stm32l4xrxx_rcc.c +++ b/arch/arm/src/stm32l4/stm32l4xrxx_rcc.c @@ -46,10 +46,6 @@ #define HSIRDY_TIMEOUT HSERDY_TIMEOUT #define MSIRDY_TIMEOUT HSERDY_TIMEOUT -/* HSE divisor to yield ~1MHz RTC clock */ - -#define HSE_DIVISOR (STM32L4_HSE_FREQUENCY + 500000) / 1000000 - /* Determine if board wants to use HSI48 as 48 MHz oscillator. */ #if defined(CONFIG_STM32L4_HAVE_HSI48) && defined(STM32L4_USE_CLK48) @@ -789,15 +785,6 @@ static void stm32l4_stdclockconfig(void) regval |= STM32L4_RCC_CFGR_PPRE1; putreg32(regval, STM32L4_RCC_CFGR); -#ifdef CONFIG_STM32L4_RTC_HSECLOCK - /* Set the RTC clock divisor */ - - regval = getreg32(STM32L4_RCC_CFGR); - regval &= ~RCC_CFGR_RTCPRE_MASK; - regval |= RCC_CFGR_RTCPRE(HSE_DIVISOR); - putreg32(regval, STM32L4_RCC_CFGR); -#endif - /* Set the PLL source and main divider */ regval = getreg32(STM32L4_RCC_PLLCFG);