On Thu, May 29, 2008 at 11:22 AM, Kumar Gala <[EMAIL PROTECTED]> wrote: > Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> > --- > cpu/mpc85xx/fdt.c | 128 > +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 128 insertions(+), 0 deletions(-) > > diff --git a/cpu/mpc85xx/fdt.c b/cpu/mpc85xx/fdt.c > index bb87740..92952e6 100644 > --- a/cpu/mpc85xx/fdt.c > +++ b/cpu/mpc85xx/fdt.c > @@ -26,6 +26,7 @@ > #include <common.h> > #include <libfdt.h> > #include <fdt_support.h> > +#include <asm/processor.h> > > extern void ft_qe_setup(void *blob); > #ifdef CONFIG_MP > @@ -77,6 +78,131 @@ void ft_fixup_cpu(void *blob, u64 memory_limit) > } > #endif > > +#ifdef CONFIG_L2_CACHE > +/* return size in kilobytes */ > +static inline u32 l2cache_size(void) > +{ > + volatile ccsr_l2cache_t *l2cache = (void *)CFG_MPC85xx_L2_ADDR; > + volatile u32 l2siz_field = (l2cache->l2ctl >> 28) & 0x3; > + u32 ver = SVR_SOC_VER(get_svr()); > + > + switch (l2siz_field) { > + case 0x0: > + break; > + case 0x1: > + if (ver == SVR_8540 || ver == SVR_8560 || > + ver == SVR_8541 || ver == SVR_8541_E || > + ver == SVR_8555 || ver == SVR_8555_E) > + return 128; > + else > + return 256; > + break; > + case 0x2: > + if (ver == SVR_8540 || ver == SVR_8560 || > + ver == SVR_8541 || ver == SVR_8541_E || > + ver == SVR_8555 || ver == SVR_8555_E) > + return 256; > + else > + return 512; > + break; > + case 0x3: > + return 1024; > + break; > + } > + > + return 0; > +}
How about we create a feature in the new cpu_type field you created, and use that to flag it. :) Andy ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users