diff options
| author | Marek Vasut <[email protected]> | 2021-07-03 04:55:32 +0200 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2021-07-10 18:12:42 +0200 |
| commit | 9b19159174f72655e59ddc94ed79c21c01a80539 (patch) | |
| tree | e76356afd134f556dc5748b3224cf4b035aa34cc /include | |
| parent | d107235a38920dcff8f35fefafeebd3479411513 (diff) | |
spl: mmc: Factor out eMMC boot partition selection code
Factor out eMMC boot partition selection code into
default_spl_mmc_emmc_boot_partition() function and implement
weak spl_mmc_emmc_boot_partition(), so that architecture or
board code can override the eMMC boot partition selection.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Faiz Abbas <[email protected]>
Cc: Harald Seiler <[email protected]>
Cc: Lokesh Vutla <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Ye Li <[email protected]>
Reviewed-by: Jaehoon Chung <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/spl.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h index cee9a42ddb5..c643943482d 100644 --- a/include/spl.h +++ b/include/spl.h @@ -357,6 +357,29 @@ u32 spl_mmc_boot_mode(const u32 boot_device); * If not overridden, it is weakly defined in common/spl/spl_mmc.c. */ int spl_mmc_boot_partition(const u32 boot_device); + +struct mmc; +/** + * default_spl_mmc_emmc_boot_partition() - eMMC boot partition to load U-Boot from. + * mmc: Pointer for the mmc device structure + * + * This function should return the eMMC boot partition number which + * the SPL should load U-Boot from (on the given boot_device). + */ +int default_spl_mmc_emmc_boot_partition(struct mmc *mmc); + +/** + * spl_mmc_emmc_boot_partition() - eMMC boot partition to load U-Boot from. + * mmc: Pointer for the mmc device structure + * + * This function should return the eMMC boot partition number which + * the SPL should load U-Boot from (on the given boot_device). + * + * If not overridden, it is weakly defined in common/spl/spl_mmc.c + * and calls default_spl_mmc_emmc_boot_partition(); + */ +int spl_mmc_emmc_boot_partition(struct mmc *mmc); + void spl_set_bd(void); /** |
