From e5c38fdd3af552f7c8cc8233b4cb62033275bc7e Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Thu, 9 May 2019 14:25:36 +0200 Subject: [PATCH] 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 --- board/st/stm32mp1/stm32mp1.c | 4 ++++ 1 file changed, 4 insertions(+) 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 @@ -523,6 +523,10 @@ enum env_location env_get_location(enum env_operation op, int prio) #ifdef CONFIG_ENV_IS_IN_UBI 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; -- 2.39.5