summaryrefslogtreecommitdiff
path: root/include/configs
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2018-01-16 09:44:24 +0100
committerJagan Teki <jagan@amarulasolutions.com>2018-01-26 20:02:33 +0530
commit99219664085a35a32688564199e0d2c3dded5077 (patch)
tree21c0d2d8a0a95528bf8b99be6f9d7e1cf424a11b /include/configs
parente89f5591f40a1c46f4a1016eddd1e215175b992f (diff)
downloadu-boot-99219664085a35a32688564199e0d2c3dded5077.tar.gz
sunxi: Add limit with the MMC environment
The MMC environment offset is getting very close to the end of the U-Boot binary now. Since we want to make sure this will not overflow, add a size limit in the board for arm64. arm32 has already that limit enforced in our custom image generation. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'include/configs')
-rw-r--r--include/configs/sunxi-common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 3855c564f9..6236e129a8 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -147,6 +147,16 @@
#endif
#if defined(CONFIG_ENV_IS_IN_MMC)
+
+#ifdef CONFIG_ARM64
+/*
+ * This is actually (CONFIG_ENV_OFFSET -
+ * (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)), but the value will be used
+ * directly in a makefile, without the preprocessor expansion.
+ */
+#define CONFIG_BOARD_SIZE_LIMIT 0x7e000
+#endif
+
#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
/* If we have two devices (most likely eMMC + MMC), favour the eMMC */
#define CONFIG_SYS_MMC_ENV_DEV 1