[U-Boot] [PATCH v6] dreamplug: initial board support.

Jason u-boot at lakedaemon.net
Mon Sep 12 13:36:51 CEST 2011


On Mon, Sep 12, 2011 at 10:37:37AM +0300, Igor Grinberg wrote:
> Sorry for jumping in that late...

Well, it hasn't been merged yet, so it's not too late in my book.  ;-)
 
> On 09/12/11 01:10, u-boot at lakedaemon.net wrote:
> > From: Jason Cooper <u-boot at lakedaemon.net>
> > 
> > Copied wholeheartedly from board/Marvell/guruplug and modified to add support
> > for SPI NOR flash.
> > 
> > CONFIG_MACH_DREAMPLUG defined in include/configs/dreamplug.h until Linus's
> > kernel.org tree adds it to mach-types.h.  Once it trickles down, the definition
> > can be removed from dreamplug.h.
> > 
> > Signed-off-by: Jason Cooper <u-boot at lakedaemon.net>
> > ---
> 
> [...]
>  
> > diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
> > new file mode 100644
> > index 0000000..cff3e9d
> > --- /dev/null
> > +++ b/board/Marvell/dreamplug/dreamplug.c
> 
> [...]
> 
> > +
> > +int board_init(void)
> > +{
> > +	/* arch number of board */
> > +	gd->bd->bi_arch_number = MACH_TYPE_DREAMPLUG;
> 
> This should be done in the board config file.
> Please, see the CONFIG_MACH_TYPE in the U-Boot documentation (README file).

Will do, v7 cued up.

> [...]
> 
> > diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
> > new file mode 100644
> > index 0000000..003d201
> > --- /dev/null
> > +++ b/include/configs/dreamplug.h
> 
> [...]
> 
> > +/*
> > + * FIXME: This belongs in mach-types.h.  However, we only pull mach-types
> > + * from Linus' kernel.org tree.  This hasn't been updated primarily due to
> > + * the recent arch/arm reshuffling.  So, in the meantime, we'll place it
> > + * here.
> > + */
> > +#define MACH_TYPE_DREAMPLUG            3550
> > +
> > +#ifdef CONFIG_MACH_DREAMPLUG
> > +# ifdef machine_arch_type
> > +#  undef machine_arch_type
> > +#  define machine_arch_type	__machine_arch_type
> > +# else
> > +#  define machine_arch_type	MACH_TYPE_DREAMPLUG
> > +# endif
> > +# define machine_is_dreamplug()	(machine_arch_type == MACH_TYPE_DREAMPLUG)
> > +#else
> > +# define machine_is_dreamplug()	(0)
> > +#endif
> > +
> 
> #define CONFIG_MACH_TYPE	MACH_TYPE_DREAMPLUG
> should be added here... and should remain after you remove the
> above as in FIXME.

Thanks for the review!

thx,

Jason.


More information about the U-Boot mailing list