From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrice Chotard Date: Fri, 10 May 2019 18:11:30 +0200 Subject: [U-Boot] [PATCH 13/14] configs: stm32mp15: Enable ENV_IS_SPI_FLASH In-Reply-To: <1557504691-26188-1-git-send-email-patrice.chotard@st.com> References: <1557504691-26188-1-git-send-email-patrice.chotard@st.com> Message-ID: <1557504691-26188-14-git-send-email-patrice.chotard@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add all relative flags needed by ENV_IS_IN_SPI_FLASH Reserved a 256KB partition in NOR to save the U-Boot environment. Signed-off-by: Patrice Chotard --- configs/stm32mp15_basic_defconfig | 1 + configs/stm32mp15_trusted_defconfig | 1 + include/configs/stm32mp1.h | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig index e8f170d..93066aa 100644 --- a/configs/stm32mp15_basic_defconfig +++ b/configs/stm32mp15_basic_defconfig @@ -44,6 +44,7 @@ CONFIG_CMD_UBI=y CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1" CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_EXT4=y +CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_IS_IN_UBI=y CONFIG_ENV_EXT4_INTERFACE="mmc" CONFIG_ENV_EXT4_DEVICE_AND_PART="0:auto" diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig index 61d4467..949b56a 100644 --- a/configs/stm32mp15_trusted_defconfig +++ b/configs/stm32mp15_trusted_defconfig @@ -36,6 +36,7 @@ CONFIG_CMD_UBI=y CONFIG_DEFAULT_DEVICE_TREE="stm32mp157c-ev1" CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_EXT4=y +CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_IS_IN_UBI=y CONFIG_ENV_EXT4_INTERFACE="mmc" CONFIG_ENV_EXT4_DEVICE_AND_PART="0:auto" diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index e9bd551..f541132 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -47,6 +47,11 @@ #define CONFIG_ENV_UBI_VOLUME_REDUND "uboot_config_r" #endif +#if defined(CONFIG_ENV_IS_IN_SPI_FLASH) +#define CONFIG_ENV_SECT_SIZE SZ_256K +#define CONFIG_ENV_OFFSET 0x00280000 +#endif + /* ATAGs */ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS @@ -119,7 +124,7 @@ #endif #define STM32MP_MTDPARTS \ - "mtdparts_nor0=256k(fsbl1),256k(fsbl2),2m(ssbl),-(nor_user)\0" \ + "mtdparts_nor0=256k(fsbl1),256k(fsbl2),2m(ssbl),256k(u-boot-env),-(nor_user)\0" \ "mtdparts_nand0=2m(fsbl),2m(ssbl),-(UBI)\0" /* -- 1.9.1