All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env
@ 2021-07-14 14:37 Pali Rohár
  2021-07-14 14:37 ` [PATCH 2/3] arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC Pali Rohár
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Pali Rohár @ 2021-07-14 14:37 UTC (permalink / raw)
  To: Stefan Roese, Andre Heider, Gérald Kerma,
	Konstantin Porotchkin, Baruch Siach, Fabio Estevam, Peng Fan
  Cc: u-boot

Ensure that 'env default -a' always set correct value to $fdtfile, even
when custom user variable is already stored in non-volatile env storage
(means that env_get("fdtfile") call returns non-NULL value).

As default value is now correctly set like if specified at compile time in
CONFIG_EXTRA_ENV_SETTINGS, there is no need to set $fdtfile explicitly via
env_set("fdtfile", ...) call.

So remove wrong skip based on env_get("fdtfile") and then also unneeded
env_set("fdtfile", ...) call.

Fixes: c4df0f6f315c ("arm: mvebu: Espressobin: Set default value for $fdtfile env variable")
Signed-off-by: Pali Rohár <pali@kernel.org>
---
 board/Marvell/mvebu_armada-37xx/board.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 6a0e2fc3cd8f..53408d37af9b 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -133,9 +133,6 @@ int board_late_init(void)
 		device_unbind(dev);
 	}
 
-	if (env_get("fdtfile"))
-		return 0;
-
 	/* Ensure that 'env default -a' set correct value to $fdtfile */
 	if (ddr4 && emmc)
 		strcpy(ptr, "fdtfile=marvell/armada-3720-espressobin-v7-emmc.dtb");
@@ -146,10 +143,6 @@ int board_late_init(void)
 	else
 		strcpy(ptr, "fdtfile=marvell/armada-3720-espressobin.dtb");
 
-	/* If $fdtfile was not set explicitly by user then set default value */
-	if (!env_get("fdtfile"))
-		env_set("fdtfile", ptr + sizeof("fdtfile="));
-
 	return 0;
 }
 #endif
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-15 10:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 14:37 [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env Pali Rohár
2021-07-14 14:37 ` [PATCH 2/3] arm: mvebu: Espressobin: Use function mmc_get_op_cond() for detecting eMMC Pali Rohár
2021-07-15  8:02   ` Stefan Roese
2021-07-14 14:37 ` [PATCH 3/3] mmc: mmc_get_op_cond: Allow quiet detection of eMMC Pali Rohár
2021-07-15  5:39   ` Baruch Siach
2021-07-15  8:03   ` Stefan Roese
2021-07-15  8:20     ` Stefan Roese
2021-07-15  8:41       ` Jaehoon Chung
2021-07-15  8:02 ` [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env Stefan Roese
2021-07-15 10:32 ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.