summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2019-05-09 14:25:36 +0200
committerPatrice Chotard <patrice.chotard@st.com>2019-06-06 17:40:15 +0200
commite5c38fdd3af552f7c8cc8233b4cb62033275bc7e (patch)
tree4a30e8e72f1b6f8f8b2a911d2c327f0c55fcec9d /board
parentbaf053f9378042f0cff9860ee771d871f3daed39 (diff)
stm32mp1: Update env_get_location for NOR support
Update env_get_location() to be able to save environment into NOR (SPI_FLASH). Series-cc: pde, cke, pch, uboot-stm32 Cover-letter: Add saveenv support for STM32MP1 This series adds saveenv support for STM32MP1 on several boot devices. STM32MP1 is able to boot on eMMC, sdcard and NOR (NAND support is not fully supported). On eMMC and sdcard, environment is saved in EXT4 partition On NOR, environment is saved in a dedicated partition On NAND, environment is saved in a UBI volume. This series: - enables NAND and NOR support on ev1 board - enables ENV_IS_IN_SPI_FLASH, ENV_IS_IN_UBI, ENV_IS_IN_EXT4 flags - fixes get_mtdparts() - allows to override interface, device and partition for ext4 environment - updates rule to set ENV_IS_NOWHERE value - introduce ENV_IS_IN_DEVICE END Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'board')
-rw-r--r--board/st/stm32mp1/stm32mp1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 4f7d24acaa..af607c5874 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -524,6 +524,10 @@ enum env_location env_get_location(enum env_operation op, int prio)
case BOOT_FLASH_NAND:
return ENVL_UBI;
#endif
+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
+ case BOOT_FLASH_NOR:
+ return ENVL_SPI_FLASH;
+#endif
default:
return ENVL_NOWHERE;
}