diff options
author | Guillaume GARDET <guillaume.gardet@free.fr> | 2014-10-15 15:53:12 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-10-27 21:54:03 (GMT) |
commit | 592f922261993bad8cfb96395342e25eda6776e3 (patch) | |
tree | ef21d085acc9f863ea50a7d1446e2acaedbd1aff /common/spl/spl_mmc.c | |
parent | 205b4f33cfe58268df7d433f2da515fe660afd9c (diff) | |
download | u-boot-fsl-qoriq-592f922261993bad8cfb96395342e25eda6776e3.tar.xz |
spl: Add EXT support to SPL
Add EXT filesystem support to SPL.
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
[trini: Fix a warning and checkpatch problems]
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'common/spl/spl_mmc.c')
-rw-r--r-- | common/spl/spl_mmc.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index a631e0a..ee71f79 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -100,9 +100,10 @@ void spl_mmc_load_image(void) #endif err = mmc_load_image_raw(mmc, CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR); -#ifdef CONFIG_SPL_FAT_SUPPORT +#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT) } else if (boot_mode == MMCSD_MODE_FS) { - debug("boot mode - FAT\n"); + debug("boot mode - FS\n"); +#ifdef CONFIG_SPL_FAT_SUPPORT #ifdef CONFIG_SPL_OS_BOOT if (spl_start_uboot() || spl_load_image_fat_os(&mmc->block_dev, CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION)) @@ -110,7 +111,20 @@ void spl_mmc_load_image(void) err = spl_load_image_fat(&mmc->block_dev, CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION, CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); + if(err) +#endif /* CONFIG_SPL_FAT_SUPPORT */ + { +#ifdef CONFIG_SPL_EXT_SUPPORT +#ifdef CONFIG_SPL_OS_BOOT + if (spl_start_uboot() || spl_load_image_ext_os(&mmc->block_dev, + CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION)) #endif + err = spl_load_image_ext(&mmc->block_dev, + CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION, + CONFIG_SPL_FS_LOAD_PAYLOAD_NAME); +#endif /* CONFIG_SPL_EXT_SUPPORT */ + } +#endif /* defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT) */ #ifdef CONFIG_SUPPORT_EMMC_BOOT } else if (boot_mode == MMCSD_MODE_EMMCBOOT) { /* |