[U-Boot] [PATCH] sdhc_boot: Make mmc_get_env_addr dependant on CONFIG_FSL_ESDHC

Fabio Estevam festevam at gmail.com
Wed Dec 14 21:29:33 CET 2011


Andy,

Ping?

Without this path it is not possible to save env vars into MMC on MX28.

On Mon, Nov 28, 2011 at 12:23 PM, Fabio Estevam
<fabio.estevam at freescale.com> wrote:
> Since commit 97039ab98 (env_mmc: Allow board code to override the environment address)
> mmc_get_env_addr is a weak-aliased function in common/env_mmc.c
>
> board/freescale/common/sdhc_boot.c also defines mmc_get_env_addr, but this should be
> dependant on CONFIG_FSL_ESDHC.
>
> Add this protection in the mmc_get_env_addr definition in sdhc_boot.c.
>
> This fixes the retrieval of CONFIG_ENV_OFFSET on i.MX28.
>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  board/freescale/common/sdhc_boot.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/board/freescale/common/sdhc_boot.c b/board/freescale/common/sdhc_boot.c
> index e432318..1d7ff1e 100644
> --- a/board/freescale/common/sdhc_boot.c
> +++ b/board/freescale/common/sdhc_boot.c
> @@ -32,6 +32,7 @@
>  #define ESDHC_BOOT_IMAGE_SIZE  0x48
>  #define ESDHC_BOOT_IMAGE_ADDR  0x50
>
> +#if defined(CONFIG_FSL_ESDHC)
>  int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
>  {
>        u8 *tmp_buf;
> @@ -60,4 +61,5 @@ int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
>        free(tmp_buf);
>
>        return 0;
> +#endif
>  }
> --
> 1.7.1
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list