diff options
author | Harald Seiler <hws@denx.de> | 2020-04-15 11:33:30 +0200 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-04-22 20:41:57 +0800 |
commit | e97590654aea4c964f49bd915543a417d0c76996 (patch) | |
tree | 526b5e72cc127a12aed7a83222fc471808097341 /include | |
parent | 4a66d4ee336048b51bf5701a2abfac9a79c5a860 (diff) | |
download | u-boot-e97590654aea4c964f49bd915543a417d0c76996.tar.gz u-boot-e97590654aea4c964f49bd915543a417d0c76996.tar.bz2 u-boot-e97590654aea4c964f49bd915543a417d0c76996.zip |
spl: mmc: Rename spl_boot_mode() to spl_mmc_boot_mode()
The function's name is misleading as one might think it is used
generally to select the boot-mode when in reality it is only used by the
MMC driver to find out in what way it should try reading U-Boot Proper
from a device (either using a filesystem, a raw sector/partition, or an
eMMC boot partition).
Rename it to spl_mmc_boot_mode() to make it more obvious what this
function is about.
Link: https://lists.denx.de/pipermail/u-boot/2020-April/405979.html
Signed-off-by: Harald Seiler <hws@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/spl.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/spl.h b/include/spl.h index 5d8d14dbf5..fffcc610bb 100644 --- a/include/spl.h +++ b/include/spl.h @@ -238,7 +238,23 @@ int spl_load_imx_container(struct spl_image_info *spl_image, /* SPL common functions */ void preloader_console_init(void); u32 spl_boot_device(void); -u32 spl_boot_mode(const u32 boot_device); + +/** + * spl_mmc_boot_mode() - Lookup function for the mode of an MMC boot source. + * @boot_device: ID of the device which the MMC driver wants to read + * from. Common values are e.g. BOOT_DEVICE_MMC1, + * BOOT_DEVICE_MMC2, BOOT_DEVICE_MMC2_2. + * + * This function should return one of MMCSD_MODE_FS, MMCSD_MODE_EMMCBOOT, or + * MMCSD_MODE_RAW for each MMC boot source which is defined for the target. The + * boot_device parameter tells which device the MMC driver is interested in. + * + * If not overridden, it is weakly defined in common/spl/spl_mmc.c. + * + * Note: It is important to use the boot_device parameter instead of e.g. + * spl_boot_device() as U-Boot is not always loaded from the same device as SPL. + */ +u32 spl_mmc_boot_mode(const u32 boot_device); int spl_boot_partition(const u32 boot_device); void spl_set_bd(void); |