diff options
author | Semen Protsenko <semen.protsenko@linaro.org> | 2016-11-16 19:19:05 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-11-18 21:20:58 -0500 |
commit | 38fed8abe7d2e7ba90deb352d0e7aed4364c5236 (patch) | |
tree | c96f3636039c221a54c24c9151f7a3ee36e0f51c /common | |
parent | c2cbd164ea5b5f564fcf03447c7bf9ec4a9f5699 (diff) | |
download | u-boot-imx-38fed8abe7d2e7ba90deb352d0e7aed4364c5236.zip u-boot-imx-38fed8abe7d2e7ba90deb352d0e7aed4364c5236.tar.gz u-boot-imx-38fed8abe7d2e7ba90deb352d0e7aed4364c5236.tar.bz2 |
spl: Convert CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to Kconfig
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
[trini: Fix sniper and kc1 migration]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/Kconfig | 27 | ||||
-rw-r--r-- | common/spl/spl_mmc.c | 4 |
2 files changed, 29 insertions, 2 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index bb99f1f..df9e0ce 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -70,6 +70,33 @@ config SPL_DISPLAY_PRINT banner ("U-Boot SPL ..."). This function should be provided by the board. +config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + bool "MMC raw mode: by sector" + depends on SPL + default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER ||ARCH_MX6 || \ + ARCH_ROCKCHIP || ARCH_MVEBU || ARCH_SOCFPGA || \ + ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \ + OMAP44XX || OMAP54XX || AM33XX || AM43XX + help + Use sector number for specifying U-Boot location on MMC/SD in + raw mode. + +config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR + hex "Address on the MMC to load U-Boot from" + depends on SPL && SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR + default 0x50 if ARCH_SUNXI + default 0x75 if ARCH_DAVINCI + default 0x80 if ARCH_UNIPHIER + default 0x8a if ARCH_MX6 + default 0x100 if ARCH_ROCKCHIP + default 0x140 if ARCH_MVEBU + default 0x200 if ARCH_SOCFPGA || ARCH_AT91 + default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \ + OMAP54XX || AM33XX || AM43XX + help + 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 TPL bool depends on SPL && SUPPORT_TPL diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index c674e61..0b681c2 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -165,7 +165,7 @@ static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, return -1; } -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR return mmc_load_image_raw_sector(spl_image, mmc, info.start + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR); #else @@ -327,7 +327,7 @@ static int spl_mmc_load_image(struct spl_image_info *spl_image, CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION); if (!err) return err; -#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR) +#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); if (!err) |