From b0b5f8769971188eef08aa30303ea16bf4f08a93 Mon Sep 17 00:00:00 2001 From: Fotis Panagiotopoulos Date: Fri, 18 Sep 2020 11:27:20 +0300 Subject: [PATCH] Removed broken overdrive function in STM32. --- arch/arm/src/stm32/stm32_pwr.c | 37 ---------------------------------- arch/arm/src/stm32/stm32_pwr.h | 13 ------------ 2 files changed, 50 deletions(-) diff --git a/arch/arm/src/stm32/stm32_pwr.c b/arch/arm/src/stm32/stm32_pwr.c index 07c6a829fb..92cbf35687 100644 --- a/arch/arm/src/stm32/stm32_pwr.c +++ b/arch/arm/src/stm32/stm32_pwr.c @@ -489,41 +489,4 @@ void stm32_pwr_disablepvd(void) #endif /* CONFIG_STM32_ENERGYLITE */ -/************************************************************************************ - * Name: stm32_pwr_enableoverdrive - * - * Description: - * Enable or disable the overdrive mode, allowing clock rates up to 180 MHz. - * If not enabled, the max allowed frequency is 168 MHz. - * - ************************************************************************************/ - -#if defined(CONFIG_STM32_HAVE_OVERDRIVE) -void stm32_pwr_enableoverdrive(bool state) -{ - /* Switch overdrive state */ - - if (state) - { - stm32_pwr_modifyreg32(STM32_PWR_CR_OFFSET, 0, PWR_CR_ODEN); - } - else - { - stm32_pwr_modifyreg32(STM32_PWR_CR_OFFSET, PWR_CR_ODEN, 0); - } - - /* Wait for overdrive ready */ - - while ((stm32_pwr_getreg32(STM32_PWR_CSR_OFFSET) & PWR_CSR_ODRDY) == 0); - - /* Set ODSWEN to switch to this new state */ - - stm32_pwr_modifyreg32(STM32_PWR_CR_OFFSET, 0, PWR_CR_ODSWEN); - - /* Wait for completion */ - - while ((stm32_pwr_getreg32(STM32_PWR_CSR_OFFSET) & PWR_CSR_ODSWRDY) == 0); -} -#endif - #endif /* CONFIG_STM32_PWR */ diff --git a/arch/arm/src/stm32/stm32_pwr.h b/arch/arm/src/stm32/stm32_pwr.h index 90b2ce53af..83bd7d5b35 100644 --- a/arch/arm/src/stm32/stm32_pwr.h +++ b/arch/arm/src/stm32/stm32_pwr.h @@ -269,19 +269,6 @@ void stm32_pwr_disablepvd(void); #endif /* CONFIG_STM32_ENERGYLITE */ -/************************************************************************************ - * Name: stm32_pwr_enableoverdrive - * - * Description: - * Enable or disable the overdrive mode, allowing clock rates up to 180 MHz. - * If not enabled, the max allowed frequency is 168 MHz. - * - ************************************************************************************/ - -#if defined(CONFIG_STM32_HAVE_OVERDRIVE) -void stm32_pwr_enableoverdrive(bool state); -#endif - #undef EXTERN #if defined(__cplusplus) }