stm32: Add an MACH_STM32F4x5 alias for F405, F407, and F429 chips

The F405, F407, and F429 chips are in the same series and almost all
code definitions should apply to all chips in that series.  Implement
the alias and fix defintions in adc.c and Kconfig that were only
applying to a subset of that series.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2021-10-06 19:48:03 -04:00
parent c1136bef10
commit e3905eb241
3 changed files with 18 additions and 15 deletions

View File

@@ -144,8 +144,7 @@ enable_clock_stm32f20x(void)
static void
enable_clock_stm32f40x(void)
{
#if CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407 \
|| CONFIG_MACH_STM32F401 || CONFIG_MACH_STM32F429
#if CONFIG_MACH_STM32F401 || CONFIG_MACH_STM32F4x5
uint32_t pll_base = (CONFIG_STM32_CLOCK_REF_25M) ? 1000000 : 2000000;
uint32_t pllp = (CONFIG_MACH_STM32F401) ? 4 : 2;
uint32_t pll_freq = CONFIG_CLOCK_FREQ * pllp, pllcfgr;
@@ -222,8 +221,7 @@ clock_setup(void)
// Configure and enable PLL
if (CONFIG_MACH_STM32F207)
enable_clock_stm32f20x();
else if (CONFIG_MACH_STM32F405 || CONFIG_MACH_STM32F407
|| CONFIG_MACH_STM32F401 || CONFIG_MACH_STM32F429)
else if (CONFIG_MACH_STM32F401 || CONFIG_MACH_STM32F4x5)
enable_clock_stm32f40x();
else
enable_clock_stm32f446();