summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-08-01 03:51:24 +0300
committerTom Rini <trini@konsulko.com>2021-08-01 03:51:24 +0300
commit5371593aed56ee11cbb6cc6ac8d058fcd9b8f58c (patch)
treed36cea4bd3ddb0657ed0139f52572c1f9f11a529 /board
parent85769006fce951d0ebf61585ae0ab6b7d880735d (diff)
parent001ec430be141fd0c6346bca985c70068ad2d52b (diff)
downloadu-boot-5371593aed56ee11cbb6cc6ac8d058fcd9b8f58c.tar.xz
Merge https://source.denx.de/u-boot/custodians/u-boot-sunxi
- Move the PSCI runtime code for H3/A23/A33 into SRAM - Pick the environment from the actual MMC boot device (SD card vs. eMMC) - Plus a small improvement from Icenowy, just for good measure.
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/board.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 67acc01d83..1a46100e40 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -636,6 +636,20 @@ int board_mmc_init(struct bd_info *bis)
return 0;
}
+
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
+int mmc_get_env_dev(void)
+{
+ switch (sunxi_get_boot_device()) {
+ case BOOT_DEVICE_MMC1:
+ return 0;
+ case BOOT_DEVICE_MMC2:
+ return 1;
+ default:
+ return CONFIG_SYS_MMC_ENV_DEV;
+ }
+}
+#endif
#endif
#ifdef CONFIG_SPL_BUILD