aboutsummaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2021-12-30 10:39:59 -0600
committerTom Rini <trini@konsulko.com>2022-01-21 14:01:35 -0500
commit22eb1526d4a619fc0095947b54f87317a55e911f (patch)
treebc730838362cfd18fe7f2e013702517ec27d20c0 /common/spl
parent434075393d7c41457662d996418e5acd0f3da0cb (diff)
downloadu-boot-22eb1526d4a619fc0095947b54f87317a55e911f.zip
u-boot-22eb1526d4a619fc0095947b54f87317a55e911f.tar.gz
u-boot-22eb1526d4a619fc0095947b54f87317a55e911f.tar.bz2
spl: Convert SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to Kconfig
Falcon mode is very useful in improving boot speed. A question that Falcon mode asks is "Where do I look for the kernel". With MMC boot media, the correct answer is CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR. The scope of this patch is to move this to Kconfig. It is possible for a system to support Falcon mode from NOR but not MMC. In that case, mmc_load_image_raw_os() would not be used. To address this, conditionally compile mmc_load_image_raw_os() when SPL_FALCON_BOOT_MMCSD, instead of SPL_OS_BOOT. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Move spl_start_uboot to its own guard in spl_mmc.c, rerun migration] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/Kconfig16
-rw-r--r--common/spl/spl_mmc.c13
2 files changed, 24 insertions, 5 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 4a739a7..e0d0a6f 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -919,6 +919,22 @@ config SYS_OS_BASE
endif # SPL_OS_BOOT
+config SPL_FALCON_BOOT_MMCSD
+ bool "Enable Falcon boot from MMC or SD media"
+ depends on SPL_OS_BOOT && SPL_MMC
+ help
+ Select this if the Falcon mode OS image mode is on MMC or SD media.
+
+config SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
+ hex "Falcon mode: Sector to load kernel uImage from MMC"
+ depends on SPL_FALCON_BOOT_MMCSD
+ help
+ When Falcon mode is used with an MMC or SD media, SPL needs to know
+ where to look for the kernel uImage. The image is expected to begin
+ at the raw MMC specified in this config.
+ Note that the Falcon mode image can also be a FIT, if FIT support is
+ enabled.
+
config SPL_PAYLOAD
string "SPL payload"
default "tpl/u-boot-with-tpl.bin" if TPL
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index d550da2..1c41d24 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -222,7 +222,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image,
}
#endif
-#if CONFIG_IS_ENABLED(OS_BOOT)
+#if CONFIG_IS_ENABLED(FALCON_BOOT_MMCSD)
static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,
struct mmc *mmc)
@@ -257,10 +257,6 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
return 0;
}
#else
-int spl_start_uboot(void)
-{
- return 1;
-}
static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,
struct mmc *mmc)
@@ -269,6 +265,13 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
}
#endif
+#ifndef CONFIG_SPL_OS_BOOT
+int spl_start_uboot(void)
+{
+ return 1;
+}
+#endif
+
#ifdef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev,