mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
env: Update env_addr for mmc environment driver
Make sure the gd struct is up-to-date. Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
e2ffeaa162
commit
0536b440a8
1 changed files with 5 additions and 0 deletions
5
env/mmc.c
vendored
5
env/mmc.c
vendored
|
@ -353,6 +353,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);
|
||||
|
||||
|
@ -374,6 +375,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);
|
||||
|
|
Loading…
Reference in a new issue