From fdfa958d5fe9ea0fdf6dceba37be697b5fc05081 Mon Sep 17 00:00:00 2001 From: Amit Kucheria Date: Wed, 26 Oct 2016 16:41:41 +0530 Subject: [PATCH] boards: stm32f4: Extract common config options Move common config options one level up to try to simplify the per-board defconfig Change-Id: I3d80fa494050634d0f877af2015b01b85df20d1d Signed-off-by: Amit Kucheria Signed-off-by: Kumar Gala --- .../st_stm32/stm32f4/Kconfig.defconfig.series | 64 +++++++++++++++++++ boards/arm/96b_carbon/96b_carbon_defconfig | 12 ---- .../arm/nucleo_f401re/nucleo_f401re_defconfig | 12 ---- 3 files changed, 64 insertions(+), 24 deletions(-) diff --git a/arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.series b/arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.series index c80ca2147df..7b7ad2bc359 100644 --- a/arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.series +++ b/arch/arm/soc/st_stm32/stm32f4/Kconfig.defconfig.series @@ -26,4 +26,68 @@ config NUM_IRQ_PRIO_BITS int default 4 +config SERIAL + def_bool y + +if SERIAL + +config CONSOLE + def_bool y + +config UART_CONSOLE + def_bool y + +config UART_STM32 + def_bool y + +config UART_STM32_PORT_0 + def_bool y + +config UART_STM32_PORT_0_NAME + default UART_0 + +config UART_STM32_PORT_0_BAUD_RATE + default 115200 + +config UART_STM32_PORT_1 + def_bool y + +config UART_STM32_PORT_1_NAME + default UART_1 + +config UART_STM32_PORT_1_BAUD_RATE + default 115200 + +endif #SERIAL + +if CLOCK_CONTROL + +config CLOCK_CONTROL_STM32F4X + def_bool y + +endif #CLOCK_CONTROL + +if GPIO + +config GPIO_STM32 + def_bool y + +config GPIO_STM32_PORTA + def_bool y + +config GPIO_STM32_PORTB + def_bool y + +config GPIO_STM32_PORTC + def_bool y + +endif #GPIO + +if PINMUX + +config PINMUX_STM32 + def_bool y + +endif #PINMUX + endif # SOC_SERIES_STM32F4X diff --git a/boards/arm/96b_carbon/96b_carbon_defconfig b/boards/arm/96b_carbon/96b_carbon_defconfig index 3ad91bbd49d..412e7818e7b 100644 --- a/boards/arm/96b_carbon/96b_carbon_defconfig +++ b/boards/arm/96b_carbon/96b_carbon_defconfig @@ -1,38 +1,26 @@ CONFIG_ARM=y CONFIG_BOARD_96B_CARBON=y -CONFIG_SOC_FAMILY_STM32=y CONFIG_SOC_SERIES_STM32F4X=y CONFIG_SOC_STM32F401RE=y # 84MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000 CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 -# enable uart driver -CONFIG_SERIAL=y -CONFIG_UART_STM32=y # enable USART1 - passthrough to FT230XQ CONFIG_UART_STM32_PORT_0=y CONFIG_UART_STM32_PORT_0_BAUD_RATE=115200 # enable console on this port by default -CONFIG_CONSOLE=y -CONFIG_UART_CONSOLE=y CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_0" # enable pinmux CONFIG_PINMUX=y -CONFIG_PINMUX_STM32=y # enable GPIO ports A, B, C, D CONFIG_GPIO=y -CONFIG_GPIO_STM32=y -CONFIG_GPIO_STM32_PORTA=y -CONFIG_GPIO_STM32_PORTB=y -CONFIG_GPIO_STM32_PORTC=y CONFIG_GPIO_STM32_PORTD=y # clock configuration CONFIG_CLOCK_CONTROL=y -CONFIG_CLOCK_CONTROL_STM32F4X=y CONFIG_CLOCK_STM32F4X_SYSCLK_SRC_PLL=y # use HSE as PLL input CONFIG_CLOCK_STM32F4X_PLL_SRC_HSE=y diff --git a/boards/arm/nucleo_f401re/nucleo_f401re_defconfig b/boards/arm/nucleo_f401re/nucleo_f401re_defconfig index 2865796c4bc..0153e46fbc6 100644 --- a/boards/arm/nucleo_f401re/nucleo_f401re_defconfig +++ b/boards/arm/nucleo_f401re/nucleo_f401re_defconfig @@ -1,37 +1,25 @@ CONFIG_ARM=y CONFIG_BOARD_NUCLEO_F401RE=y -CONFIG_SOC_FAMILY_STM32=y CONFIG_SOC_SERIES_STM32F4X=y CONFIG_SOC_STM32F401RE=y # 84MHz system clock CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=84000000 CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 -# enable uart driver -CONFIG_SERIAL=y -CONFIG_UART_STM32=y # enable USART2 - passthrough to STLINK v2 connector CONFIG_UART_STM32_PORT_1=y CONFIG_UART_STM32_PORT_1_BAUD_RATE=115200 # enable console on this port by default -CONFIG_CONSOLE=y -CONFIG_UART_CONSOLE=y CONFIG_UART_CONSOLE_ON_DEV_NAME="UART_1" # enable pinmux CONFIG_PINMUX=y -CONFIG_PINMUX_STM32=y # enable GPIO ports A, B, C CONFIG_GPIO=y -CONFIG_GPIO_STM32=y -CONFIG_GPIO_STM32_PORTA=y -CONFIG_GPIO_STM32_PORTB=y -CONFIG_GPIO_STM32_PORTC=y # clock configuration CONFIG_CLOCK_CONTROL=y -CONFIG_CLOCK_CONTROL_STM32F4X=y CONFIG_CLOCK_STM32F4X_SYSCLK_SRC_PLL=y # use HSE as PLL input CONFIG_CLOCK_STM32F4X_PLL_SRC_HSE=y