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

Lad, Prabhakar prabhakar.lad at ti.com
Wed Jun 20 12:31:49 CEST 2012


Hi Christian,

On Wed, Jun 20, 2012 at 14:50:41, Christian Riesch wrote:
> Hi Prabhakar,
> 
> On Tue, Jun 19, 2012 at 7:06 AM, Lad, Prabhakar <prabhakar.lad at ti.com> wrote:
> > Hi Christian,
> >
> > On Tue, Jun 19, 2012 at 01:09:08, Christian Riesch wrote:
> >> 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.
> >>
     Ok
   
> >  The board is booted up in SPI boot mode only, ie the SPL is loaded from
> >  SPI flash itself and finally when low level initialization is completed
> >  The SPL loads the U-boot image in MMC/SD card when CONFIG_SPL_MMC_LOAD
> >  Config is defined. If CONFIG_SPL_MMC_LOAD is not defined by default the
> >  SPL loads the U-boot image from SPI flash itself.
> 
> Yes, but your code prints "SPI boot" for both cases, doesn't it?
> 
> >>
> >>       +#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.
> >
> >  No not to boot from MMC, its indicating to SPL which is flashed in
> >  SPI flash to load the U-boot image(u-boot.bin) from MMC.
> 
> Yes, but your code requires both CONFIG_SPL_MMC_LOAD and
> CONFIG_SPL_SPI_LOAD to be defined to load u-boot from MMC, right? This
> is confusing.
> 
> Of course SPL itself is loaded from SPI flash in both cases, but this
> does not matter here, since the SPL has already loaded to the internal
> SRAM of the SoC by the ROM bootloader of the chip. The SPL could have
> been loaded from some other kind of memory (or UART) as well and would
> not know the difference.

Ok I'll use CONFIG_SPL_MMC_LOAD while loading from MMC. I'll incorporate
These  changes for v3.

Thx,
--Prabhakar Lad

> 
> Regards, Christian
> 
> >
> > Thx,
> > --Prabhakar Lad
> >
> >>
> >> Regards, Christian
> >>
> >
> > _______________________________________________
> > 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