[U-Boot] [PATCH] env: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it
Faiz Abbas
faiz_abbas at ti.com
Mon Feb 5 13:37:07 UTC 2018
Hi,
On Monday 05 February 2018 02:59 AM, Alex Kiernan wrote:
> On Fri, Feb 2, 2018 at 9:47 AM, Faiz Abbas <faiz_abbas at ti.com> wrote:
>> When booting from a non-MMC device, the MMC sub-system may not be
>> initialized when the environment is first accessed.
>> We need to make sure that the MMC sub-system is ready in even a non-MMC
>> boot case.
>>
>> Therefore, initialize mmc during .init() of environment.
>>
>> Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
>> ---
>> env/ext4.c | 9 +++++++++
>> env/fat.c | 9 +++++++++
>> env/mmc.c | 8 ++++++++
>> 3 files changed, 26 insertions(+)
>>
>> diff --git a/env/ext4.c b/env/ext4.c
>> index 9cdf28e..ba93e5b 100644
>> --- a/env/ext4.c
>> +++ b/env/ext4.c
>> @@ -123,9 +123,18 @@ err_env_relocate:
>> return -EIO;
>> }
>>
>> +static int env_ext4_init(void)
>> +{
>> + if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc"))
>
> Shouldn't that be CONFIG_ENV_EXT4_INTERFACE ?
Yes. Will fix in v2.
Thanks,
Faiz
More information about the U-Boot
mailing list