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>
This commit is contained in:
Patrice Chotard 2019-05-09 14:25:36 +02:00
parent baf053f937
commit e5c38fdd3a

View file

@ -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;