All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: "Pali Rohár" <pali@kernel.org>,
	"Andre Heider" <a.heider@gmail.com>,
	"Gérald Kerma" <gerald@gk2.net>,
	"Konstantin Porotchkin" <kostap@marvell.com>,
	"Baruch Siach" <baruch@tkos.co.il>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Peng Fan" <peng.fan@nxp.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env
Date: Thu, 15 Jul 2021 10:02:28 +0200	[thread overview]
Message-ID: <4971582e-872b-877e-3ffe-1cc925fc4660@denx.de> (raw)
In-Reply-To: <20210714143729.2396-1-pali@kernel.org>

On 14.07.21 16:37, Pali Rohár wrote:
> 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>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   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
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

  parent reply	other threads:[~2021-07-15  8:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Stefan Roese [this message]
2021-07-15 10:32 ` [PATCH 1/3] arm: mvebu: Espressobin: Fix setting $fdtfile env Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4971582e-872b-877e-3ffe-1cc925fc4660@denx.de \
    --to=sr@denx.de \
    --cc=a.heider@gmail.com \
    --cc=baruch@tkos.co.il \
    --cc=festevam@gmail.com \
    --cc=gerald@gk2.net \
    --cc=kostap@marvell.com \
    --cc=pali@kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.