[U-Boot] [PATCH] powerpc: Consolidate bootcount_{store|load} for PowerPC
Stefan Roese
sr at denx.de
Wed Apr 28 09:14:22 CEST 2010
Hi Michael,
On Tuesday 27 April 2010 17:56:27 Michael Zaidman wrote:
> It makes sense to keep some measure of flexibility by giving to the
> user possibility to override the CONFIG_SYS_BOOTCOUNT_ADDR definition.
> It can be easily achieved by adding the following lines:
>
> #ifdef CONFIG_SYS_BOOTCOUNT_ADDR
> #define _BOOTCOUNT_ADDR CONFIG_SYS_BOOTCOUNT_ADDR
> #else
>
> > +#if defined(CONFIG_MPC5xxx)
> > +#define CONFIG_BOOTCOUNT_ADDR (MPC5XXX_CDM_BRDCRMB)
> > +#define CONFIG_SYS_BOOTCOUNT_USE_32BIT
>
> Also CONFIG_ as stated in u-boot's README should specify selectable by
> user options. I suggest omitting of all the locally defined CONFIG_ in
> your code.
I'll change CONFIG_BOOTCOUNT_ADDR to CONFIG_SYS_BOOTCOUNT_ADDR. And only
overwrite/define this value, when not already defined.
> > +#endif /* defined(CONFIG_MPC5xxx) */
> > +
> > +#if defined(CONFIG_MPC821) || defined(CONFIG_MPC823) || \
> > + defined(CONFIG_MPC850) || defined(CONFIG_MPC852T) || \
> > + defined(CONFIG_MPC855) || \
> > + defined(CONFIG_MPC860) || defined(CONFIG_MPC866) || \
> > + defined(CONFIG_MPC885)
>
> This fragment does not cover all mpc8xx permutations.
I did run MAKEALL 8xx and nothing broke. But you may be right. I'll check this
again.
> We can cover
> them all by the following code:
>
> #if defined(CONFIG_MPC821) || defined(CONFIG_MPC823) || \
> defined(CONFIG_MPC855) || defined(CONFIG_MPC855T)|| \
> defined(CONFIG_MPC850) || defined(CONFIG_MPC86x)
Some 8xx variants are missing here as well (e.g. CONFIG_MPC852T,
CONFIG_MPC885).
> I just used the CONFIG_MPC86x which has been already constructed by
> common.h and accomplished the list by CPUs that for unknown to me reason
> are not mentioned in common.h Probably, the better way is to add them into
> the common.h...
CONFIG_8xx seems the way to go. I just noticed it and will use it in the next
patch version.
Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
More information about the U-Boot
mailing list