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 v4 07/13] davinci: Use correct #ifdef around gdata/bdata
Date: Mon, 27 Feb 2012 17:32:53 +0530	[thread overview]
Message-ID: <20120227120253.GA3066@Hardy> (raw)
In-Reply-To: <CABkLObphbD0mDzi8My-Vy7HQk76=pWvD7Qd64G++-PrebMzNaw@mail.gmail.com>

hi Christian,

On Mon Feb 27, 2012 at 12:37:16PM +0100, Christian Riesch wrote:
> Hi Sughosh,
> 
> On Mon, Feb 27, 2012 at 11:56 AM, Sughosh Ganu <urwithsughosh@gmail.com> wrote:
> > hi Christian,
> >
> > On Mon Feb 27, 2012 at 11:39:42AM +0100, Christian Riesch wrote:
> >> Hi,
> >>
> >> On Mon, Feb 27, 2012 at 11:16 AM, Sughosh Ganu <urwithsughosh@gmail.com> wrote:
> >
> > <snip>
> >
> >> >> >> ?arch/arm/cpu/arm926ejs/davinci/spl.c | ? ?2 ++
> >> >> >> ?1 files changed, 2 insertions(+), 0 deletions(-)
> >> >> >>
> >> >> >> diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c
> >> >> >> index b1eff26..2861907 100644
> >> >> >> --- a/arch/arm/cpu/arm926ejs/davinci/spl.c
> >> >> >> +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c
> >> >> >> @@ -32,10 +32,12 @@
> >> >> >>
> >> >> >> ?#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
> >> >> >>
> >> >> >> +#ifdef CONFIG_SPL_SPI_LOAD
> >> >> >> ?DECLARE_GLOBAL_DATA_PTR;
> >> >> >> ?/* Define global data structure pointer to it*/
> >> >> >> ?static gd_t gdata __attribute__ ((section(".data")));
> >> >> >> ?static bd_t bdata __attribute__ ((section(".data")));
> >> >> >> +#endif
> >
> > <snip>
> >
> >> >> > ?Can you specify which boards you get this warning for. With your
> >> >> > ?patch to add libcommon to hawkboard's spl image, this is now also
> >> >> > ?needed for hawkboard which uses CONFIG_SPL_NAND_LOAD.
> >>
> >> Simon's patch is for the hawkboard, since due to another patch in his
> >> patchset LIBCOMMON is enabled in hawkboard's SPL. Now we have a board
> >> that boots from NAND with SPL and has LIBCOMMON enabled (Simon, I did
> >> not check the rest of your patchset, why do you need LIBCOMMON on the
> >> hawkboard at all?)
> >
> > ?LIBCOMMON is now needed as the generic relocation based functions
> > ?are part of the libcommon.o, which are being enabled in the same
> > ?patchset for all arm boards. So if i understand correct, all arm
> > ?board based spl's now need libcommon and libgeneric.
> >
> > ?The only thing i see is that libcommon and libgeneric are not
> > ?defined for cam_enc_4xx board which uses spl, and this patchset does
> > ?not add it either. Not sure whether it got missed.
> 
> When I asked Heiko Schocher a few month ago why he defined putc and
> puts in arch/arm/cpu/arm926ejs/davinci/spl.c he replied that he could
> not use LIBCOMMON due to size limitations for the SPL. So I guess that
> this board will not be able to use the generic relocation functions,
> unless the SPL is smaller than 16kB, right? Simon's patchset will
> break this board then, right?

  That is exactly what i reported in one of the threads in response to
  addition of libcommon and libgeneric to the hawkboard's spl. In
  fact, this might cause problems on quite a few boards with spl size
  restrictions. I am not sure, whether the generic relocation feature
  should be turned on by default on all boards or should be a config
  option -- at least for the spl builds. Another option would be to
  move it to a place where it is not needed to compile in the entire
  libcommon/libgeneric support that is not needed for the generic
  relocation code. I think that would help us keep the generic
  relocation without the size bloat that we see right now.

  http://lists.denx.de/pipermail/u-boot/2012-February/118567.html

<snip>

> >> void board_init_r(gd_t *id, ulong dummy)
> >> {
> >> #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
> >> ? ? ? ? mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN,
> >> ? ? ? ? ? ? ? ? ? ? ? ? CONFIG_SYS_MALLOC_LEN);
> >
> > ?Can you please explain why we need the mem_malloc_init. I did not
> > ?include this, and spl boots up just fine on my board.
> >
> 
> malloc is required for the SPI code only, so you could also put it
> within #ifdef CONFIG_SPL_SPI_LOAD

  Ok, i will move the common changes to a static function, and call
  it from both the nand and spi load cases. Or, should i wait till a
  consensus is drawn on whether to enable this feature for spl images
  also. In case this is not needed for spl, then we don't need this
  change.

-sughosh

  reply	other threads:[~2012-02-27 12:02 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21  1:32 [U-Boot] [PATCH v4 0/13] Introduce generic relocation feature Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 01/13] Define CONFIG_SYS_SKIP_RELOC for all archs Simon Glass
2012-03-06  5:04   ` Mike Frysinger
2012-03-06  6:27     ` Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 02/13] Add generic relocation feature Simon Glass
2012-02-21 19:36   ` Albert ARIBAUD
2012-02-21 20:03     ` Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 03/13] arm: Export and promote relocation symbols Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 04/13] arm: Add start_call_board_init_r() to each start.S Simon Glass
2012-02-21 19:32   ` Albert ARIBAUD
2012-02-21 20:02     ` Simon Glass
2012-02-23 13:07       ` Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 05/13] Move memcpy(), memset() into new lib/membasic.c Simon Glass
2012-03-06  5:05   ` Mike Frysinger
2012-03-06  6:34     ` Simon Glass
2012-03-06 16:20       ` Mike Frysinger
2012-03-07  5:43         ` Simon Glass
2012-03-07  5:50         ` Graeme Russ
2012-03-07 17:48           ` Simon Glass
2012-03-11  7:35           ` Mike Frysinger
2012-02-21  1:32 ` [U-Boot] [PATCH v4 06/13] arm: Add explicit __image_copy_end symbol for ARM926EJ-S Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 07/13] davinci: Use correct #ifdef around gdata/bdata Simon Glass
2012-02-21 15:24   ` Tom Rini
2012-02-23 17:25   ` Sughosh Ganu
2012-02-26 17:56     ` Simon Glass
2012-02-27 10:16       ` Sughosh Ganu
2012-02-27 10:39         ` Christian Riesch
2012-02-27 10:56           ` Sughosh Ganu
2012-02-27 11:37             ` Christian Riesch
2012-02-27 12:02               ` Sughosh Ganu [this message]
2012-02-28 21:55                 ` Albert ARIBAUD
2012-02-28 22:03                   ` Scott Wood
2012-03-03 20:22                 ` Simon Glass
2012-03-03 20:29                   ` Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 08/13] tx25: Modify to work with generic relocation Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 09/13] hawkboard: " Simon Glass
2012-02-21 15:25   ` Tom Rini
2012-02-23  8:43   ` Sughosh Ganu
2012-02-23 15:11     ` Sughosh Ganu
2012-02-26 18:09       ` Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 10/13] mx31pdk: " Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 11/13] smdk6400: " Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 12/13] arm: Move over to " Simon Glass
2012-02-21  1:32 ` [U-Boot] [PATCH v4 13/13] arm: Remove unused code in start.S Simon Glass
2012-02-21 19:40 ` [U-Boot] [PATCH v4 0/13] Introduce generic relocation feature Albert ARIBAUD
2012-02-21 20:07   ` Simon Glass
2012-02-21 20:10     ` Graeme Russ
2012-02-21 20:16       ` Simon Glass
     [not found]         ` <4F4D4511.6020708@aribaud.net>
2012-03-03 16:01           ` Simon Glass

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=20120227120253.GA3066@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.