[U-Boot] [PATCH 2/2] Add board support for hawkboard
Sughosh Ganu
urwithsughosh at gmail.com
Fri Oct 22 10:52:47 CEST 2010
hi Wolfgang,
On Fri Oct 22, 2010 at 10:05:43AM +0200, Wolfgang Denk wrote:
> Dear Sughosh Ganu,
>
> In message <20101022075016.GB8597 at Hardy> you wrote:
> >
> > > Is there not a better way than adding such a huge #ifdef block?
> >
> > Not sure about this one. I need the pinmux configuration functions
> > from this file.
>
> How about splitting the file, and using a separate file for the pinmux
> stuff?
Fine, will implement this.
> > > Again: can we not avoid such a huge #ifdef block here?
> >
> >
> > We need this initialisation for the nand spl part alone, and this is
> > board specific. Can you please suggest any better way of handling
> > this.
>
> If it turns out that we have code that is common to NAND SPL and
> normal U-Boot, and other code that is not shared, these parts should
> be separated into different files so NAND SPL can build and use the
> common stuff and normal U-Boot additionally build and use the other
> stuff.
Ok. Will split out the code that is specific to nand spl in a
different file, which would not be compiled in for the normal
u-boot.
> > > > #if defined(CONFIG_ARM) && !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
> > > > -void board_init_f (ulong bootflag)
> > > > +void __board_init_f (ulong bootflag)
> > > > {
> > > > relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
> > > > CONFIG_SYS_TEXT_BASE);
> > > > }
> > > > +void board_init_f (ulong bootflag)__attribute__((weak, alias("__board_init_f")));
> > > > #endif
> > >
> > > This is a global change that affects all NAND booting boards. This
> > > must be submitted spearately, and you must explain in detail why you
> > > think you need that. Also please mention on which systems this change
> > > has been tested.
> >
> > For hawkboard, we need to do some board specific initialisation
> > which can be included in board_init_f. The freescale boards which
>
> Can you probably do it in any of the other, board dependent init
> functions?
Not sure on this one. The only board specific function that gets
called in the nand spl stage is board_init_f.
-sughosh
More information about the U-Boot
mailing list