From: Pankit Garg Date: Tue, 19 Nov 2019 09:49:31 +0000 Subject: [U-Boot] [PATCH] env: Update env_addr for mmc environment driver Message-ID: <20191119094545.16014-1-pankit.garg@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Pankit Garg --- env/mmc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/env/mmc.c b/env/mmc.c index 9f1878def1..832e11cde6 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -362,6 +362,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); @@ -383,6 +384,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); -- 2.17.1