configs: stm32mp15: Enable ENV_IS_SPI_FLASH
authorPatrice Chotard <patrice.chotard@st.com>
Thu, 24 Jan 2019 10:33:29 +0000 (11:33 +0100)
committerPatrice Chotard <patrice.chotard@st.com>
Thu, 6 Jun 2019 15:40:15 +0000 (17:40 +0200)
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 <patrice.chotard@st.com>
configs/stm32mp15_basic_defconfig
configs/stm32mp15_trusted_defconfig
include/configs/stm32mp1.h

index 23fdb31bd0bf77035ba629871e18801446a1e83a..ae77bd57e4ebbbd608064eb26cbfe8484126fd62 100644 (file)
@@ -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"
index 20c5e7139017583d134bcc7716aec969767114c6..64ce86aae323d78550f03ea72dbf06ae660d8d7b 100644 (file)
@@ -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"
index dadd96eb601bafc6d7f73a0c9fed996ca732592e..a3f84900f212a8cc2953468bad9ac1a4410ac14b 100644 (file)
 #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
 #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(ssbl1),2m(ssbl2),-(UBI)\0"
 
 /*