[U-Boot] [RFC 03/11] spl: mmc: Export function to get device index

Andreas Dannenberg dannenberg at ti.com
Thu May 16 20:54:46 UTC 2019


To better support use cases where we want to side-load additional files
during SPL execution from MMC media export the SPL MMC framework function
for determining the MMC boot device index.

Signed-off-by: Andreas Dannenberg <dannenberg at ti.com>
---
 common/spl/spl_mmc.c | 2 +-
 include/spl.h        | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 324d91c884..6bdc348e94 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -94,7 +94,7 @@ end:
 	return 0;
 }
 
-static int spl_mmc_get_device_index(u32 boot_device)
+int spl_mmc_get_device_index(u32 boot_device)
 {
 	switch (boot_device) {
 	case BOOT_DEVICE_MMC1:
diff --git a/include/spl.h b/include/spl.h
index f09909e189..98e8d1e951 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -327,6 +327,8 @@ bool spl_was_boot_source(void);
  */
 int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr);
 
+int spl_mmc_get_device_index(u32 boot_device);
+
 int spl_mmc_load_image(struct spl_image_info *spl_image,
 		       struct spl_boot_device *bootdev);
 
-- 
2.17.1



More information about the U-Boot mailing list