Skip to contentSkip to conversation

spl: env: Correct dependencies for SPL_SAVEENV and MMC

PATCH In review Tom Rini 1 participant 2 messages Mar 23 – Apr 7

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 spl: env: Correct dependencies for SPL_SAVEENV and MMC

The SPL_SAVEENV functionality, when working with an MMC device, can only work with SPL_MMC_WRITE enabled. This however only works with SPL_MMC also being enabled. Update the dependencies to show that if we have enabled SPL_ENV_IS_IN_MMC then we select SPL_MMC_WRITE and make SPL_ENV_IS_IN_MMC depends on SPL_MMC.

---
 common/spl/Kconfig | 2 +-
 env/Kconfig        | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
common/spl/Kconfig +1 -1
index d1a85f50209e..57b2bef5e541 100644
@@ -729,7 +729,7 @@ config SPL_ENV_SUPPORT
 config SPL_SAVEENV
 	bool "Support save environment"
 	depends on SPL_ENV_SUPPORT
-	select SPL_MMC_WRITE if ENV_IS_IN_MMC
+	select SPL_MMC_WRITE if SPL_ENV_IS_IN_MMC
 	help
 	  Enable save environment support in SPL after setenv. By default
 	  the saveenv option is not provided in SPL, but some boards need
env/Kconfig +1 -0
index 5979f7faa996..532adf884da8 100644
@@ -847,6 +847,7 @@ config SPL_ENV_IS_IN_MMC
 	bool "SPL Environment in an MMC device"
 	depends on !SPL_ENV_IS_NOWHERE
 	depends on !SPL_OS_BOOT_SECURE
+	depends on SPL_MMC
 	depends on ENV_IS_IN_MMC
 	default y
 	help
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 8 lines · Tom Rini

The SPL_SAVEENV functionality, when working with an MMC device, can only work with SPL_MMC_WRITE enabled. This however only works with SPL_MMC also being enabled. Update the dependencies to show that if we have enabled SPL_ENV_IS_IN_MMC then we select SPL_MMC_WRITE and make SPL_ENV_IS_IN_MMC depends on SPL_MMC.

[...]

Applied to u-boot/master, thanks!

[1/1] spl: env: Correct dependencies for SPL_SAVEENV and MMC

      commit: b25d864a97b986ef1038697c8f0dd73262d05220
Signature · 1 line
Tom