[U-Boot,2/2] configs: stm32: move config flag from defconfig to Kconfig

Message ID 1515745430-13801-3-git-send-email-patrice.chotard@st.com
State Accepted
Commit aea0af8993446505043687fe3751cb34a2b8dead
Delegated to: Tom Rini
Headers show
Series
  • Rename serial_stm32x7.c to serial_stm32.c
Related show

Commit Message

Patrice Chotard Jan. 12, 2018, 8:23 a.m.
From: Patrice Chotard <patrice.chotard@st.com>

Move system flags from defconfig to mach-stm32/Kconfig

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
 arch/arm/mach-stm32/Kconfig           | 22 ++++++++++++++++++++++
 configs/stm32f429-discovery_defconfig | 11 -----------
 configs/stm32f469-discovery_defconfig | 11 -----------
 configs/stm32f746-disco_defconfig     | 11 -----------
 4 files changed, 22 insertions(+), 33 deletions(-)

Comments

Vikas Manocha Jan. 13, 2018, 12:17 a.m. | #1
Hi,

On 01/12/2018 12:23 AM, patrice.chotard@st.com wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
> 
> Move system flags from defconfig to mach-stm32/Kconfig
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
One comment below 


> ---
>  arch/arm/mach-stm32/Kconfig           | 22 ++++++++++++++++++++++
>  configs/stm32f429-discovery_defconfig | 11 -----------
>  configs/stm32f469-discovery_defconfig | 11 -----------
>  configs/stm32f746-disco_defconfig     | 11 -----------
>  4 files changed, 22 insertions(+), 33 deletions(-)
> 
> diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
> index f4c93f1..5f7a2b5 100644
> --- a/arch/arm/mach-stm32/Kconfig
> +++ b/arch/arm/mach-stm32/Kconfig
> @@ -2,9 +2,31 @@ if STM32
>  
>  config STM32F4
>  	bool "stm32f4 family"
> +	select CLK
> +	select DM_GPIO
> +	select DM_RESET
> +	select MISC
> +	select PINCTRL
> +	select PINCTRL_STM32
> +	select RAM
> +	select STM32_SDRAM
> +	select STM32_RCC
> +	select STM32_RESET
> +	select STM32_SERIAL
>  
>  config STM32F7
>  	bool "stm32f7 family"
> +	select CLK
> +	select DM_GPIO
> +	select DM_RESET
> +	select MISC
> +	select PINCTRL
> +	select PINCTRL_STM32
> +	select RAM
> +	select STM32_SDRAM
> +	select STM32_RCC
> +	select STM32_RESET
> +	select STM32_SERIAL

Can you have one common selection(like STM32_SERIAL) like under 'if STM32'.

Cheers,
Vikas

>  	select SUPPORT_SPL
>  	select SPL
>  	select SPL_CLK
> diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig
> index 6f7a12f..ec67aad 100644
> --- a/configs/stm32f429-discovery_defconfig
> +++ b/configs/stm32f429-discovery_defconfig
> @@ -19,16 +19,5 @@ CONFIG_CMD_TIMER=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_OF_EMBED=y
>  CONFIG_ENV_IS_IN_FLASH=y
> -CONFIG_CLK=y
> -CONFIG_DM_GPIO=y
> -CONFIG_MISC=y
> -CONFIG_STM32_RCC=y
>  # CONFIG_MMC is not set
>  CONFIG_MTD_NOR_FLASH=y
> -CONFIG_PINCTRL=y
> -CONFIG_PINCTRL_STM32=y
> -CONFIG_RAM=y
> -CONFIG_STM32_SDRAM=y
> -CONFIG_DM_RESET=y
> -CONFIG_STM32_RESET=y
> -CONFIG_STM32_SERIAL=y
> diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig
> index 5b70aa9..8190b82 100644
> --- a/configs/stm32f469-discovery_defconfig
> +++ b/configs/stm32f469-discovery_defconfig
> @@ -26,17 +26,6 @@ CONFIG_CMD_FS_GENERIC=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_OF_EMBED=y
>  # CONFIG_BLK is not set
> -CONFIG_CLK=y
> -CONFIG_DM_GPIO=y
> -CONFIG_MISC=y
> -CONFIG_STM32_RCC=y
>  CONFIG_DM_MMC=y
>  CONFIG_ARM_PL180_MMCI=y
>  CONFIG_MTD_NOR_FLASH=y
> -CONFIG_PINCTRL=y
> -CONFIG_PINCTRL_STM32=y
> -CONFIG_RAM=y
> -CONFIG_STM32_SDRAM=y
> -CONFIG_DM_RESET=y
> -CONFIG_STM32_RESET=y
> -CONFIG_STM32_SERIAL=y
> diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig
> index 69df866..f8fa198 100644
> --- a/configs/stm32f746-disco_defconfig
> +++ b/configs/stm32f746-disco_defconfig
> @@ -39,10 +39,6 @@ CONFIG_OF_CONTROL=y
>  CONFIG_NET_RANDOM_ETHADDR=y
>  CONFIG_NETCONSOLE=y
>  # CONFIG_BLK is not set
> -CONFIG_CLK=y
> -CONFIG_DM_GPIO=y
> -CONFIG_MISC=y
> -CONFIG_STM32_RCC=y
>  CONFIG_DM_MMC=y
>  # CONFIG_SPL_DM_MMC is not set
>  CONFIG_ARM_PL180_MMCI=y
> @@ -53,14 +49,7 @@ CONFIG_SPI_FLASH=y
>  CONFIG_SPI_FLASH_STMICRO=y
>  CONFIG_DM_ETH=y
>  CONFIG_ETH_DESIGNWARE=y
> -CONFIG_PINCTRL=y
>  # CONFIG_PINCTRL_FULL is not set
> -CONFIG_PINCTRL_STM32=y
> -CONFIG_RAM=y
> -CONFIG_STM32_SDRAM=y
> -CONFIG_DM_RESET=y
> -CONFIG_STM32_RESET=y
> -CONFIG_STM32_SERIAL=y
>  CONFIG_DM_SPI=y
>  CONFIG_STM32_QSPI=y
>  CONFIG_OF_LIBFDT_OVERLAY=y
>
Tom Rini Jan. 19, 2018, 9:15 p.m. | #2
On Fri, Jan 12, 2018 at 09:23:50AM +0100, patrice.chotard@st.com wrote:

> From: Patrice Chotard <patrice.chotard@st.com>
> 
> Move system flags from defconfig to mach-stm32/Kconfig
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>

Applied to u-boot/master, thanks!

Patch

diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
index f4c93f1..5f7a2b5 100644
--- a/arch/arm/mach-stm32/Kconfig
+++ b/arch/arm/mach-stm32/Kconfig
@@ -2,9 +2,31 @@  if STM32
 
 config STM32F4
 	bool "stm32f4 family"
+	select CLK
+	select DM_GPIO
+	select DM_RESET
+	select MISC
+	select PINCTRL
+	select PINCTRL_STM32
+	select RAM
+	select STM32_SDRAM
+	select STM32_RCC
+	select STM32_RESET
+	select STM32_SERIAL
 
 config STM32F7
 	bool "stm32f7 family"
+	select CLK
+	select DM_GPIO
+	select DM_RESET
+	select MISC
+	select PINCTRL
+	select PINCTRL_STM32
+	select RAM
+	select STM32_SDRAM
+	select STM32_RCC
+	select STM32_RESET
+	select STM32_SERIAL
 	select SUPPORT_SPL
 	select SPL
 	select SPL_CLK
diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig
index 6f7a12f..ec67aad 100644
--- a/configs/stm32f429-discovery_defconfig
+++ b/configs/stm32f429-discovery_defconfig
@@ -19,16 +19,5 @@  CONFIG_CMD_TIMER=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 CONFIG_ENV_IS_IN_FLASH=y
-CONFIG_CLK=y
-CONFIG_DM_GPIO=y
-CONFIG_MISC=y
-CONFIG_STM32_RCC=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_STM32=y
-CONFIG_RAM=y
-CONFIG_STM32_SDRAM=y
-CONFIG_DM_RESET=y
-CONFIG_STM32_RESET=y
-CONFIG_STM32_SERIAL=y
diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig
index 5b70aa9..8190b82 100644
--- a/configs/stm32f469-discovery_defconfig
+++ b/configs/stm32f469-discovery_defconfig
@@ -26,17 +26,6 @@  CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_OF_EMBED=y
 # CONFIG_BLK is not set
-CONFIG_CLK=y
-CONFIG_DM_GPIO=y
-CONFIG_MISC=y
-CONFIG_STM32_RCC=y
 CONFIG_DM_MMC=y
 CONFIG_ARM_PL180_MMCI=y
 CONFIG_MTD_NOR_FLASH=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_STM32=y
-CONFIG_RAM=y
-CONFIG_STM32_SDRAM=y
-CONFIG_DM_RESET=y
-CONFIG_STM32_RESET=y
-CONFIG_STM32_SERIAL=y
diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig
index 69df866..f8fa198 100644
--- a/configs/stm32f746-disco_defconfig
+++ b/configs/stm32f746-disco_defconfig
@@ -39,10 +39,6 @@  CONFIG_OF_CONTROL=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 # CONFIG_BLK is not set
-CONFIG_CLK=y
-CONFIG_DM_GPIO=y
-CONFIG_MISC=y
-CONFIG_STM32_RCC=y
 CONFIG_DM_MMC=y
 # CONFIG_SPL_DM_MMC is not set
 CONFIG_ARM_PL180_MMCI=y
@@ -53,14 +49,7 @@  CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
-CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_FULL is not set
-CONFIG_PINCTRL_STM32=y
-CONFIG_RAM=y
-CONFIG_STM32_SDRAM=y
-CONFIG_DM_RESET=y
-CONFIG_STM32_RESET=y
-CONFIG_STM32_SERIAL=y
 CONFIG_DM_SPI=y
 CONFIG_STM32_QSPI=y
 CONFIG_OF_LIBFDT_OVERLAY=y