[U-Boot] [PATCH v4 07/13] davinci: Use correct #ifdef around gdata/bdata

Sughosh Ganu urwithsughosh at gmail.com
Mon Feb 27 11:16:13 CET 2012


hi Simon,

On Sun Feb 26, 2012 at 09:56:37AM -0800, Simon Glass wrote:
> Hi Sughosh,
> 
> On Thu, Feb 23, 2012 at 9:25 AM, Sughosh Ganu <urwithsughosh at gmail.com> wrote:
> > hi Simon,
> >
> > On Mon Feb 20, 2012 at 05:32:49PM -0800, Simon Glass wrote:
> >> This fixes the following warnings in an SPL build when libcommon is
> >> in use:
> >>
> >> spl.c:37: warning: 'gdata' defined but not used
> >> spl.c:38: warning: 'bdata' defined but not used
> >>
> >> Signed-off-by: Simon Glass <sjg at chromium.org>
> >> ---
> >> Changes in v4:
> >> - Add new patch to fix davinci build warnings
> >>
> >>  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
> >
> >  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.
> 
> Perhaps it is any davinci board, with SPI? I don't have any of these -
> I was just fixing what I thought was a minor #ifdef bug in the code.

  I checked the configs for all the davinci boards, and cam_enc_4xx,
  da850* and hawkboard use spl. Out of these the da850* use a spi
  flash, while cam_enc_4xx and hawkboard both use a nand. So we should
  not be using the CONFIG_SPL_SPI_LOAD check to exclude the gdata and
  bdata objects -- these are now needed after adding the libcommon
  support to the hawkboard.

  Also, the cam_enc_4xx board which uses a spl does not have
  CONFIG_SPL_LIBCOMMON_SUPPORT and CONFIG_SPL_LIBGENERIC_SUPPORT
  defined and this patchset does not add these defines for the
  board. Was adding these defines for the board missed out. If so,
  then this patch would no longer be needed.

-sughosh


More information about the U-Boot mailing list