diff mbox series

[u-boot,v2019.04-aspeed-openbmc,v2] config: ast2600 openbmc: Move environment to eMMC

Message ID 1594237988-1573-1-git-send-email-anoo@linux.ibm.com
State New
Headers show
Series [u-boot,v2019.04-aspeed-openbmc,v2] config: ast2600 openbmc: Move environment to eMMC | expand

Commit Message

Adriana Kobylak July 8, 2020, 7:53 p.m. UTC
From: Adriana Kobylak <anoo@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@us.ibm.com>
Tested-by: Adriana Kobylak <anoo@us.ibm.com>
---
 configs/ast2600_openbmc_spl_defconfig | 10 ++--------
 include/configs/evb_ast2600a1_spl.h   |  6 ++++++
 2 files changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

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 */