From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 21 Apr 2010 15:51:00 +0200 Subject: [U-Boot] [RFC] PPC: post_word_{load/store} - eliminate redundant code In-Reply-To: References: <20100420213909.7FE50E22AD9@gemini.denx.de> Message-ID: <201004211551.00797.sr@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 Hi Michael, On Wednesday 21 April 2010 15:24:15 Michael Zaidman wrote: > >> In order to eliminate redundant code for powerPC architecture when > >> defining post_word_{load/store} routines I suggest moving them into > >> the arch/ppc/lib/commproc.c file rather than adding them to every > >> arch/ppc/cpu/XXXX. > > > > NAK. The commproc.* files are supposed to contain code dealing with > > the PowerQUICC Communication Processor Modules. This is in no way the > > right place for common code. > > Meanwhile the post_word_{load/store} are located in the commproc.c > files for the following architectures: > mpc8260, > mpc85xx, > mpc8xx, > ppc4xx. I just started looking into this as well. > Looking for the way to add POST functionality for the mpc83xx family I > realized that the post_word_{load/store} can be generalized for all > ppc architectures. Or a weak default version even for all architectures. > Could you point please to the file where such kind of things - common > for all CPU families of particular architecture should be located? If done for all architectures, then "post/post.c" (already exists) or "lib/post.c" (new file) comes to my mind. Any comments on this? Other suggestions? 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