From: Tom Rini Date: Mon, 22 Apr 2019 12:12:49 -0400 Subject: [U-Boot] [U-Boot, v2] env: Update env_addr for mmc environment driver In-Reply-To: <1552889710-30850-1-git-send-email-pankit.garg@nxp.com> References: <1552889710-30850-1-git-send-email-pankit.garg@nxp.com> Message-ID: <20190422161249.GE4664@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Mar 18, 2019 at 06:16:55AM +0000, Pankit Garg wrote: > Signed-off-by: Pankit Garg > --- > Changes for v2: > - Remove CRC calculation as it is already part of env_import > - Update env_addr after env_import > > env/mmc.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/env/mmc.c b/env/mmc.c > index c3cf35d..d329bea 100644 > --- a/env/mmc.c > +++ b/env/mmc.c > @@ -313,6 +313,7 @@ static int env_mmc_load(void) > int ret; > int dev = mmc_get_env_dev(); > const char *errmsg; > + env_t *ep = NULL; > > mmc = find_mmc_device(dev); > > @@ -334,6 +335,10 @@ static int env_mmc_load(void) > } > > ret = env_import(buf, 1); > + if (!ret) { > + ep = (env_t *)buf; > + gd->env_addr = (ulong)&(ep->data); > + } > > fini: > fini_mmc_for_env(mmc); Do we need to update the redundant env location section of code with this too? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: