[U-Boot] [PATCH v2 3/7] da850/omap-l138: Add support to read u-boot image from MMC/SD

Christian Riesch christian.riesch at omicron.at
Mon Jun 18 21:39:08 CEST 2012


Hi,
Sorry for the delay, had a lot of other work to do :-/

On Thursday, June 7, 2012, Prabhakar Lad wrote:

> From: Lad, Prabhakar <prabhakar.lad at ti.com <javascript:;>>
>
> DA850/OMAP-L138 does not support strict MMC/SD boot mode. SPL will
> be in SPI flash and U-Boot image will be in MMC/SD card. SPL will
> do the low level initialization and then loads the u-boot image
> from MMC/SD card.
>
> Define the CONFIG_SPL_MMC_LOAD macro in the DA850/OMAP-L138
> configuration file to enable this feature.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.lad at ti.com <javascript:;>>
> Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj at ti.com <javascript:;>>
> Signed-off-by: Hadli, Manjunath <manjunath.hadli at ti.com <javascript:;>>
> ---
>  arch/arm/cpu/arm926ejs/davinci/spl.c |   12 ++++++-
>  drivers/mmc/Makefile                 |    4 ++
>  drivers/mmc/spl_mmc_load.c           |   62
> ++++++++++++++++++++++++++++++++++
>  include/configs/da850evm.h           |    8 ++++
>  include/mmc.h                        |    2 +
>  5 files changed, 87 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/mmc/spl_mmc_load.c
>
> diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c
> b/arch/arm/cpu/arm926ejs/davinci/spl.c
> index 74632e5..be397ce 100644
> --- a/arch/arm/cpu/arm926ejs/davinci/spl.c
> +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
> @@ -28,6 +28,11 @@
>  #include <ns16550.h>
>  #include <malloc.h>
>  #include <spi_flash.h>
> +#include <mmc.h>
> +#include <fat.h>
> +#include <version.h>
> +#include <asm/arch/davinci_misc.h>
> +#include <asm/arch/pinmux_defs.h>
>
>  #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
>
> @@ -91,6 +96,11 @@ void board_init_r(gd_t *id, ulong dummy)
>        gd->have_console = 1;
>
>        puts("SPI boot...\n");
> +#ifdef CONFIG_SPL_MMC_LOAD
> +       spl_mmc_load();
> +#else
>        spi_boot();
> -#endif


Hmm, now the code prints "SPI boot" and then it boots from MMC, right?
Please output correct messages.


> +#endif /* CONFIG_SPL_MMC_LOAD */
> +
> +#endif /* CONFIG_SPL_SPI_LOAD */


So, CONFIG_SPL_SPI_LOAD must be defined to boot from MMC?? Ths does not
make sense to me.

Regards, Christian


More information about the U-Boot mailing list