diff options
author | Dalon Westergreen <dwesterg@gmail.com> | 2017-02-10 17:15:35 -0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-02-17 14:15:15 -0500 |
commit | 949123e30a61696610fc70ea89b1387eba0dace4 (patch) | |
tree | fb8ff5131dbd0529fbbf27649e94026ed1a87722 /common | |
parent | f0fb4fa7d556379235723e755d8d56a811ac137f (diff) | |
download | u-boot-949123e30a61696610fc70ea89b1387eba0dace4.tar.gz u-boot-949123e30a61696610fc70ea89b1387eba0dace4.tar.xz u-boot-949123e30a61696610fc70ea89b1387eba0dace4.zip |
SPL: Move SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION to Kconfig
Added SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION and
SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION to Kconfig.
Due to SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION being moved to
Kconfig the board defconfigs for db-88f6820-gp_defconfig
kc1_defconfig and sniper_defconfig need to be updated.
Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/Kconfig | 14 | ||||
-rw-r--r-- | common/spl/spl_mmc.c | 12 |
2 files changed, 17 insertions, 9 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index baff7b672e..60ae60c17e 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -96,6 +96,20 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR Address on the MMC to load U-Boot from, when the MMC is being used in raw mode. Units: MMC sectors (1 sector = 512 bytes). +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION + bool "MMC Raw mode: by partition" + depends on SPL + help + Use a partition for loading U-Boot when using MMC/SD in raw mode. + +config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION + hex "Partition to use to load U-Boot from" + depends on SPL && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION + default 1 + help + Partition on the MMC to load U-Boot from when the MMC is being + used in raw mode + config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE bool "MMC raw mode: by partition type" depends on SPL && DOS_PARTITION && \ diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index fb51fd5a98..18c1b59b22 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -150,7 +150,7 @@ static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device) return 0; } -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, struct mmc *mmc, int partition) { @@ -187,13 +187,6 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, return mmc_load_image_raw_sector(spl_image, mmc, info.start); #endif } -#else -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION -1 -static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, - struct mmc *mmc, int partition) -{ - return -ENOSYS; -} #endif #ifdef CONFIG_SPL_OS_BOOT @@ -341,11 +334,12 @@ int spl_mmc_load_image(struct spl_image_info *spl_image, if (!err) return err; } - +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION err = mmc_load_image_raw_partition(spl_image, mmc, CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION); if (!err) return err; +#endif #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR err = mmc_load_image_raw_sector(spl_image, mmc, CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR); |