[PATCH u-boot v2019.04-aspeed-openbmc v2] config: ast2600 openbmc: Move environment to eMMC
Adriana Kobylak
anoo at linux.ibm.com
Thu Jul 9 05:53:08 AEST 2020
From: Adriana Kobylak <anoo at us.ibm.com>
The ast2600 openbmc will favor eMMC over NOR. Moving the
environment to eMMC and configuring it as a redundant
environment. The location is the first partition of the
User Data area (mmcblk0p1), which is at offset 0x5000
because of the GPT header plus it's 4k-aligned.
CONFIG_SYS_MMC_ENV_DEV 0 /* User data mmcblk0 */
CONFIG_ENV_OFFSET 0x5000 /* Offset from beginning of dev */
CONFIG_ENV_OFFSET_REDUND 0x6000 /* ENV_OFFSET + 0x1000 */
Signed-off-by: Adriana Kobylak <anoo at us.ibm.com>
Tested-by: Adriana Kobylak <anoo at us.ibm.com>
---
configs/ast2600_openbmc_spl_defconfig | 10 ++--------
include/configs/evb_ast2600a1_spl.h | 6 ++++++
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/configs/ast2600_openbmc_spl_defconfig b/configs/ast2600_openbmc_spl_defconfig
index c2e3393..86eb9a1 100644
--- a/configs/ast2600_openbmc_spl_defconfig
+++ b/configs/ast2600_openbmc_spl_defconfig
@@ -15,7 +15,7 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_ENV_SIZE=0x10000
-CONFIG_ENV_OFFSET=0xE0000
+CONFIG_ENV_OFFSET=0x5000
CONFIG_SPL=y
CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
CONFIG_ARMV7_PSCI_NR_CPUS=2
@@ -69,13 +69,7 @@ CONFIG_CMD_FS_GENERIC=y
CONFIG_CMD_MTDPARTS=y
CONFIG_EFI_PARTITION=y
CONFIG_SPL_OF_CONTROL=y
-CONFIG_ENV_IS_IN_SPI_FLASH=y
-CONFIG_USE_ENV_SPI_BUS=y
-CONFIG_ENV_SPI_BUS=0
-CONFIG_USE_ENV_SPI_CS=y
-CONFIG_ENV_SPI_CS=0
-CONFIG_USE_ENV_SPI_MAX_HZ=y
-CONFIG_ENV_SPI_MAX_HZ=100000000
+CONFIG_ENV_IS_IN_MMC=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_REGMAP=y
diff --git a/include/configs/evb_ast2600a1_spl.h b/include/configs/evb_ast2600a1_spl.h
index faefbc9..085eefc 100644
--- a/include/configs/evb_ast2600a1_spl.h
+++ b/include/configs/evb_ast2600a1_spl.h
@@ -36,4 +36,10 @@
#define CONFIG_SPL_BSS_START_ADDR 0x90000000
#define CONFIG_SPL_BSS_MAX_SIZE 0x00100000
+/* MMC */
+#ifdef CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV 0
+#define CONFIG_ENV_OFFSET_REDUND 0x6000
+#endif
+
#endif /* __CONFIG_H */
--
1.8.3.1
More information about the openbmc
mailing list