X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=env%2Fext4.c;h=7626784ca6386bc2298e0a003fbec161f6fb9e25;hb=da9c3392e6cb2f3bf6d9973b1bda3b6881608b8e;hp=3f3aac57377344c76bdde3c5e358034117a7b088;hpb=2166ebf7831674508425daf50c78e481083c6462;p=u-boot diff --git a/env/ext4.c b/env/ext4.c index 3f3aac5737..7626784ca6 100644 --- a/env/ext4.c +++ b/env/ext4.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (c) Copyright 2016 by VRT Technology * @@ -15,8 +16,6 @@ * EXT4 filesystem implementation in Uboot by * Uma Shankar * Manjunatha C Achar - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -31,8 +30,6 @@ #include #include -DECLARE_GLOBAL_DATA_PTR; - #ifdef CONFIG_CMD_SAVEENV static int env_ext4_save(void) { @@ -87,6 +84,11 @@ static int env_ext4_load(void) int err; loff_t off; +#ifdef CONFIG_MMC + if (!strcmp(CONFIG_ENV_EXT4_INTERFACE, "mmc")) + mmc_initialize(NULL); +#endif + part = blk_get_device_part_str(CONFIG_ENV_EXT4_INTERFACE, CONFIG_ENV_EXT4_DEVICE_AND_PART, &dev_desc, &info, 1);