diff mbox series

[2/3] board: stm32mp1: move CONFIG_ENV_XXX in defconfig

Message ID 20200113141742.28182-3-patrick.delaunay@st.com
State Accepted
Commit 493305716c7c91e91b3fcdcdd4a1bd662157c1ff
Headers show
Series stm32mp1: split board and SOC support for STM32MP15x family | expand

Commit Message

Patrick Delaunay Jan. 13, 2020, 2:17 p.m. UTC
Move CONFIG_ENV_SECT_SIZE and CONFIG_ENV_OFFSET in stm32mp15_*_defconfig
for ST board with NOR support (STM32MP15xx-EV1 boards)
- CONFIG_SECT_SIZE values = the max supported NOR erase size (256KB)
- CONFIG_ENV_OFFSET = offset for NOR (ENV_IS_IN_SPI_FLASH)

This Patch prepares the U-Boot support of boards with STM32MP15x SOC
not provided by STMicroelectronics.

Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

 board/st/stm32mp1/Kconfig           | 6 ------
 configs/stm32mp15_basic_defconfig   | 2 ++
 configs/stm32mp15_optee_defconfig   | 2 ++
 configs/stm32mp15_trusted_defconfig | 2 ++
 4 files changed, 6 insertions(+), 6 deletions(-)

Comments

Patrice CHOTARD Jan. 17, 2020, 12:45 p.m. UTC | #1
Hi

On 1/13/20 3:17 PM, Patrick Delaunay wrote:
> Move CONFIG_ENV_SECT_SIZE and CONFIG_ENV_OFFSET in stm32mp15_*_defconfig
> for ST board with NOR support (STM32MP15xx-EV1 boards)
> - CONFIG_SECT_SIZE values = the max supported NOR erase size (256KB)
> - CONFIG_ENV_OFFSET = offset for NOR (ENV_IS_IN_SPI_FLASH)
>
> This Patch prepares the U-Boot support of boards with STM32MP15x SOC
> not provided by STMicroelectronics.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
>  board/st/stm32mp1/Kconfig           | 6 ------
>  configs/stm32mp15_basic_defconfig   | 2 ++
>  configs/stm32mp15_optee_defconfig   | 2 ++
>  configs/stm32mp15_trusted_defconfig | 2 ++
>  4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/board/st/stm32mp1/Kconfig b/board/st/stm32mp1/Kconfig
> index 9f985e5775..89fc562746 100644
> --- a/board/st/stm32mp1/Kconfig
> +++ b/board/st/stm32mp1/Kconfig
> @@ -9,12 +9,6 @@ config SYS_VENDOR
>  config SYS_CONFIG_NAME
>  	default "stm32mp1"
>  
> -config ENV_SECT_SIZE
> -	default 0x40000 if ENV_IS_IN_SPI_FLASH
> -
> -config ENV_OFFSET
> -	default 0x280000 if ENV_IS_IN_SPI_FLASH
> -
>  config TARGET_STM32MP157C_DK2
>  	bool "support of STMicroelectronics STM32MP157C-DK2 Discovery Board"
>  	default y
> diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
> index 713a7e6c57..8f0c7e9339 100644
> --- a/configs/stm32mp15_basic_defconfig
> +++ b/configs/stm32mp15_basic_defconfig
> @@ -1,6 +1,8 @@
>  CONFIG_ARM=y
>  CONFIG_ARCH_STM32MP=y
>  CONFIG_SYS_MALLOC_F_LEN=0x3000
> +CONFIG_ENV_SECT_SIZE=0x40000
> +CONFIG_ENV_OFFSET=0x280000
>  CONFIG_SPL_MMC_SUPPORT=y
>  CONFIG_SPL=y
>  CONFIG_TARGET_STM32MP1=y
> diff --git a/configs/stm32mp15_optee_defconfig b/configs/stm32mp15_optee_defconfig
> index f9161fd7d1..b036bb738b 100644
> --- a/configs/stm32mp15_optee_defconfig
> +++ b/configs/stm32mp15_optee_defconfig
> @@ -1,6 +1,8 @@
>  CONFIG_ARM=y
>  CONFIG_ARCH_STM32MP=y
>  CONFIG_SYS_MALLOC_F_LEN=0x3000
> +CONFIG_ENV_SECT_SIZE=0x40000
> +CONFIG_ENV_OFFSET=0x280000
>  CONFIG_TARGET_STM32MP1=y
>  CONFIG_STM32MP1_OPTEE=y
>  CONFIG_DISTRO_DEFAULTS=y
> diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
> index a5ea528ae3..956ba90153 100644
> --- a/configs/stm32mp15_trusted_defconfig
> +++ b/configs/stm32mp15_trusted_defconfig
> @@ -1,6 +1,8 @@
>  CONFIG_ARM=y
>  CONFIG_ARCH_STM32MP=y
>  CONFIG_SYS_MALLOC_F_LEN=0x3000
> +CONFIG_ENV_SECT_SIZE=0x40000
> +CONFIG_ENV_OFFSET=0x280000
>  CONFIG_TARGET_STM32MP1=y
>  CONFIG_DISTRO_DEFAULTS=y
>  CONFIG_FIT=y


Reviewed-by: Patrice Chotard <patrice.chotard at st.com>

Thanks
Patrick Delaunay Jan. 17, 2020, 3:12 p.m. UTC | #2
Hi,

> From: Patrick DELAUNAY <patrick.delaunay at st.com>
> Sent: lundi 13 janvier 2020 15:18
> 
> Move CONFIG_ENV_SECT_SIZE and CONFIG_ENV_OFFSET in
> stm32mp15_*_defconfig for ST board with NOR support (STM32MP15xx-EV1
> boards)
> - CONFIG_SECT_SIZE values = the max supported NOR erase size (256KB)
> - CONFIG_ENV_OFFSET = offset for NOR (ENV_IS_IN_SPI_FLASH)
> 
> This Patch prepares the U-Boot support of boards with STM32MP15x SOC not
> provided by STMicroelectronics.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---

Applied to u-boot-stm32/master, thanks!

Regards
Patrick
diff mbox series

Patch

diff --git a/board/st/stm32mp1/Kconfig b/board/st/stm32mp1/Kconfig
index 9f985e5775..89fc562746 100644
--- a/board/st/stm32mp1/Kconfig
+++ b/board/st/stm32mp1/Kconfig
@@ -9,12 +9,6 @@  config SYS_VENDOR
 config SYS_CONFIG_NAME
 	default "stm32mp1"
 
-config ENV_SECT_SIZE
-	default 0x40000 if ENV_IS_IN_SPI_FLASH
-
-config ENV_OFFSET
-	default 0x280000 if ENV_IS_IN_SPI_FLASH
-
 config TARGET_STM32MP157C_DK2
 	bool "support of STMicroelectronics STM32MP157C-DK2 Discovery Board"
 	default y
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
index 713a7e6c57..8f0c7e9339 100644
--- a/configs/stm32mp15_basic_defconfig
+++ b/configs/stm32mp15_basic_defconfig
@@ -1,6 +1,8 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_STM32MP=y
 CONFIG_SYS_MALLOC_F_LEN=0x3000
+CONFIG_ENV_SECT_SIZE=0x40000
+CONFIG_ENV_OFFSET=0x280000
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL=y
 CONFIG_TARGET_STM32MP1=y
diff --git a/configs/stm32mp15_optee_defconfig b/configs/stm32mp15_optee_defconfig
index f9161fd7d1..b036bb738b 100644
--- a/configs/stm32mp15_optee_defconfig
+++ b/configs/stm32mp15_optee_defconfig
@@ -1,6 +1,8 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_STM32MP=y
 CONFIG_SYS_MALLOC_F_LEN=0x3000
+CONFIG_ENV_SECT_SIZE=0x40000
+CONFIG_ENV_OFFSET=0x280000
 CONFIG_TARGET_STM32MP1=y
 CONFIG_STM32MP1_OPTEE=y
 CONFIG_DISTRO_DEFAULTS=y
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index a5ea528ae3..956ba90153 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -1,6 +1,8 @@ 
 CONFIG_ARM=y
 CONFIG_ARCH_STM32MP=y
 CONFIG_SYS_MALLOC_F_LEN=0x3000
+CONFIG_ENV_SECT_SIZE=0x40000
+CONFIG_ENV_OFFSET=0x280000
 CONFIG_TARGET_STM32MP1=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y