From: Wolfgang Denk Date: Thu, 02 Sep 2010 21:01:37 +0200 Subject: [U-Boot] [PATCH v2 1/2] APM82xxx: Add CPU and other peripheral support In-Reply-To: References: <1283390214-28255-1-git-send-email-tmarri@apm.com> <20100902115535.98934153781@gemini.denx.de> Message-ID: <20100902190137.5AEB9153781@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Tirumala Marri, In message 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.