mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
stm32l4 remove useless RTCPRE setup
This commit is contained in:
committed by
Petro Karashchenko
parent
9850766d07
commit
7e4193c4a3
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user