summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
Diffstat (limited to 'env')
-rw-r--r--env/mmc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/env/mmc.c b/env/mmc.c
index b24c35cec9..251ad07d7c 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -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);