[U-Boot] [RFC] RFC: convert MPC8536DS to use generic board
Scott Wood
scottwood at freescale.com
Wed Apr 30 01:12:58 CEST 2014
On Sat, 2014-04-26 at 09:36 -0700, York Sun wrote:
> On 04/26/2014 02:22 AM, Wolfgang Denk wrote:
> >> +#ifdef CONFIG_PPC
> >> + gd = (gd_t *) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
> >> + __asm__ __volatile__("":::"memory");
> >> +#endif
> >
> > Again, this is a global change. Why is this now needed?
> >
>
> It has been this way for powerpc. Do we have an alternative?
gd is already initialized at the beginning of board_init_f(). If PPC
needs gd before board_init_f(), then add PPC (or some other relevant
symbol if it's not all PPC) to the #ifndef X86. In any case, there
should be no need to add yet another initialization of gd.
cpu_init_early_f() already initialized and cleared it. Also, if gd
really is needed before board_init_f(), then we probably need to skip
clearing gd in board_init_f().
As for the memory clobber, if nobody can come up with a reason for its
existence, then just let it go away. At the very least, don't copy the
barrier without also copying the comment that went with it -- but I'm
really not seeing what it's trying to order. gd is a register, not
memory. Maybe some versions of GCC had a bug that the clobber worked
around -- does it apply to any recent GCC? In any case, for mpc85xx, gd
was previously initalized as discussed above.
-Scott
More information about the U-Boot
mailing list