[U-Boot] [PATCH v2 1/2] APM82xxx: Add CPU and other peripheral support

Wolfgang Denk wd at denx.de
Thu Sep 2 21:01:37 CEST 2010


Dear Tirumala Marri,

In message <f5b257a2367890d26637726f5c8e1dea at mail.gmail.com> you wrote:
> 
> > On the other hand, this seems to be a 464 core, so should we not print
> > 464 here?
> [Marri] Interesting point, For all other processors we were printing SoC
> name not the CPU core name.
> APM82xxx is SoC name.

OK.

Hm.., the whole CPU ID code in "arch/powerpc/cpu/ppc4xx/cpu.c" has
become a mess.

Stefan:

is there any deeper logic for the repeated #ifdef's there, when we
finally do a switch on the PVR anyway?

Instead of painstakingly concatenating  "AMCC PowerPC 4" with "05"
and later "GP Rev. B" we could shrink this into a plain

	case PVR_405GP_RB:
		puts("AMCC PowerPC 405GP Rev. B");
		break;
	
Or am I missing something?

Let's get rid of all these nested #ifdef's...


> > > diff --git a/include/ppc440.h b/include/ppc440.h
> > > index c807dda..b5c1832 100644
> > > --- a/include/ppc440.h
> > > +++ b/include/ppc440.h
> >
> > Hm... you are adding a number of large blocks of code, all #ifdef'ed.
> >
> > This is ugly, difficult to read and difficult to maintain.
> >
> > Why not adding a new file  include/apm82xxx.h  instead?
> >
> [Marri] If we create new file it would cause too many changes in the
> common files.
> When more and more APM8xxxx processors with new registers definitions
> being released
> At that point we can create separate file. Please suggest ?

If there are plans for more and more APM8xxxx processors with new
registers definitions to be released we should not create a mess now
and later go into efforts to clean it up again, but start with a
separate register definitions file apm82xxx.h now.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The more sins you confess, the more books you will sell.


More information about the U-Boot mailing list