All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sughosh Ganu <urwithsughosh@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 2/3] arm/davinci: spl - boot device selection
Date: Wed, 11 Jul 2012 12:08:24 +0530	[thread overview]
Message-ID: <20120711063824.GA26793@Hardy> (raw)
In-Reply-To: <20120710232053.7bfb3858@weasel.local>

On Tue Jul 10, 2012 at 11:20:53PM +0400, Mikhail Kshevetskiy wrote:
> On Wed, 11 Jul 2012 00:09:06 +0530
> Sughosh Ganu <urwithsughosh@gmail.com> wrote:
> > > diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c
> > > b/arch/arm/cpu/arm926ejs/davinci/spl.c index 74632e5..50b4bbc 100644
> > > --- a/arch/arm/cpu/arm926ejs/davinci/spl.c
> > > +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
> > 
> > <snip>
> > 
> > >  void board_init_r(gd_t *id, ulong dummy)
> > >  {
> > > -#ifdef CONFIG_SPL_NAND_LOAD
> > > -	nand_init();
> > > -	puts("Nand boot...\n");
> > > -	nand_boot();
> > > -#endif
> > > -#ifdef CONFIG_SPL_SPI_LOAD
> > > -	mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN,
> > > -			CONFIG_SYS_MALLOC_LEN);
> > > +	u32 boot_device;
> > > +	void (*uboot)(void) __noreturn;
> > > +
> > > +	mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
> > > +			CONFIG_SYS_SPL_MALLOC_SIZE);
> > 
> > We do not need any heap for the spl on the hawkboard, so can you
> > please explain why do we need the heap allocation for all spl
> > images. Can't this be made configurable.
> 
> this is needed at least for:
>   * MMC support
>   * SPI support
>   * gunzip support (see next patch)
> 
> it can be configurable, but is it reasonable?

I would think so -- i guess it should be fine to include this only for
boards/configurations that actually need the heap.

> 
> > >  
> > >  	gd = &gdata;
> > >  	gd->bd = &bdata;
> > >  	gd->flags |= GD_FLG_RELOC;
> > > +#ifdef CONFIG_SPL_SERIAL_SUPPORT
> > >  	gd->baudrate = CONFIG_BAUDRATE;
> > > -	serial_init();          /* serial communications setup */
> > > +	serial_init();
> > >  	gd->have_console = 1;
> > > +#endif
> > 
> > This call to serial_init is not needed on the hawkboard -- we
> > initialise the console needed for spl through NS16550_init for all
> > da8xx based spl's in arch_cpu_init, which suffices for spl's debug
> > message requirement. I know this is being used for spi based spl
> > images, but now that this is being made common, just wanted to
> > know why we need this. Also, do these changes have any impact on the
> > size of the spl images.
> 
> hm, i'll look on it more carefully. I've just look on spi support in spl.
> 
> What about ymodem support? If I am not mistake it require a normal console.

If it's needed for ymodem support, include it for that use case -- i
see that your patch already has a separate cases for ymodem
support, spi flash support and so on. Can't it be called for cases
where it is really needed.

Btw, forgot to mention in my earlier mail that you need to add the
license header for all the new files, like spl_mmc.c etc.

-sughosh

  reply	other threads:[~2012-07-11  6:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 18:53 [U-Boot] [PATCH V3 1/3] MMC: u-boot-spl may be compiled without partition support Mikhail Kshevetskiy
2012-07-09 18:53 ` [U-Boot] [PATCH V3 2/3] arm/davinci: spl - boot device selection Mikhail Kshevetskiy
2012-07-09 19:41   ` Tom Rini
2012-07-09 19:57     ` Mikhail Kshevetskiy
2012-07-09 20:08       ` Tom Rini
2012-07-09 20:10         ` Mikhail Kshevetskiy
2012-07-10 18:39   ` Sughosh Ganu
2012-07-10 19:20     ` Mikhail Kshevetskiy
2012-07-11  6:38       ` Sughosh Ganu [this message]
2012-07-11  8:19         ` Tom Rini
2012-07-11 10:40           ` Sughosh Ganu
2012-07-11 10:46             ` Tom Rini
2012-07-11 11:05               ` Sughosh Ganu
2012-07-11 11:43                 ` Tom Rini
2012-07-11 12:08                   ` Sughosh Ganu
2012-07-11 12:15                     ` Tom Rini
2012-07-09 18:53 ` [U-Boot] [PATCH V3 3/3] arm/davinci: spl - add compressed u-boot image support Mikhail Kshevetskiy
2012-07-10 18:49   ` Sughosh Ganu
2012-07-10 19:29     ` Mikhail Kshevetskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120711063824.GA26793@Hardy \
    --to=urwithsughosh@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.