[U-Boot] [PATCH] env: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it
Alex Kiernan
alex.kiernan at gmail.com
Sun Feb 4 21:29:46 UTC 2018
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 ?
--
Alex Kiernan
More information about the U-Boot
mailing list