[U-Boot] [PATCH v2] global_data: unify global flag defines

Mike Frysinger vapier at gentoo.org
Mon Dec 5 07:39:27 CET 2011


On Sunday 04 December 2011 22:47:59 Graeme Russ wrote:
> On Mon, Dec 5, 2011 at 2:43 PM, Mike Frysinger wrote:
> > +/*
> > + * Base for arches to start adding their own:
> > + * #define GD_FLG_FOO  (GD_FLG_ARCH_BASE << 0)
> > + * #define GD_FLG_BAR  (GD_FLG_ARCH_BASE << 1)
> > + * #define GD_FLG_COW  (GD_FLG_ARCH_BASE << 2)
> > + */
> > +#define GD_FLG_ARCH_BASE       0x00100
> > +
> > +#endif
> 
> This doesn't leave any room for new standard flags - flags is a u32,
> so why not define the low 16 bits as standard and the high 16 bit as
> arch specific - Maybe even split the high 16 bits into low 8 bits for
> arch specific, high 8 bits for board specific?

when we add a new common flag, we simply update GD_FLG_ARCH_BASE.  i don't see 
the need for this complexity.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111205/47998562/attachment.pgp>


More information about the U-Boot mailing list