X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=env%2Fmmc.c;h=a8b661db80af45766811d7620c1b5b5d6dca23e7;hb=31f39b2f46a4ab49a38179e59dd7c468065e43e3;hp=b24c35cec94e24f200516656972fa7dac7eb3337;hpb=a09fea1d28fe3c69a64bee092f5a764274d26ca2;p=oweals%2Fu-boot.git diff --git a/env/mmc.c b/env/mmc.c index b24c35cec9..a8b661db80 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; #if CONFIG_IS_ENABLED(OF_CONTROL) static inline int mmc_offset_try_partition(const char *str, s64 *val) { - disk_partition_t info; + struct disk_partition info; struct blk_desc *desc; int len, i, ret; @@ -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);