[PATCH 10/10] arm: mvebu: clearfog: don't assume MMC booting

Joel Johnson mrjoel at lixil.net
Sat Jan 11 20:36:39 CET 2020


Remove MMC booting assumptions from clearfog_defconfig. Their
presence in starting config files conflicts with default ENV_IS_IN
selection logic based on boot source, since the "select" option
can't distinguish between user-overridden and defconfig selected.

Signed-off-by: Joel Johnson <mrjoel at lixil.net>
---


The real objective is to remove CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC as
well but I couldn't identify an available mechanism to do so.
Requiring it as enabled in the defconfig results in additional items
being unneccessarily included if switching boot device after starting
with the defconfig, as well as ENV_IS_IN_MMC being undesirably
residually defined.

---
 arch/arm/mach-mvebu/Kconfig     | 1 +
 board/solidrun/clearfog/Kconfig | 5 +++++
 configs/clearfog_defconfig      | 3 ---
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index b3239b2b01..3f9aa4b26e 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -248,6 +248,7 @@ config MVEBU_SPL_BOOT_DEVICE_MMC
 	select SPL_DM_GPIO
 	select SPL_DM_MMC
 	select SPL_LIBDISK_SUPPORT
+	select SPL_MMC_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_SATA
 	bool "SATA"
diff --git a/board/solidrun/clearfog/Kconfig b/board/solidrun/clearfog/Kconfig
index 253b925ba1..bd51df8750 100644
--- a/board/solidrun/clearfog/Kconfig
+++ b/board/solidrun/clearfog/Kconfig
@@ -52,6 +52,11 @@ config ENV_SECT_SIZE
 	# Use optimistic 64 KiB erase block, will vary between actual media
 	default 0x10000 if MVEBU_SPL_BOOT_DEVICE_MMC
 
+config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
+	hex "Address on the MMC to load U-Boot from"
+	default 0x141
+	depends on MVEBU_SPL_BOOT_DEVICE_MMC
+
 config SYS_SPI_U_BOOT_OFFS
 	hex "address of u-boot payload in SPI flash"
 	default 0x20000
diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 0b55e63079..eab24c32f0 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -9,7 +9,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_CLEARFOG=y
 CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y
-CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
@@ -24,7 +23,6 @@ CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x141
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
@@ -39,7 +37,6 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
-CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_AHCI_MVEBU=y
-- 
2.20.1



More information about the U-Boot mailing list