From: Wolfgang Denk Date: Mon, 18 Jul 2016 21:31:20 +0200 Subject: [U-Boot] more "#if 0" pedantry related to moving macros in header files In-Reply-To: References: Message-ID: <20160718193120.A0103100E60@atlas.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 "Robert P. J. Day", In message you wrote: > > but this brings up the question, where should content like that > properly be defined? it seems awkward to break the bit flag > definitions for a single register over two header files (especially > when they're not defined syntactically identically). is there a > historical reason that that content is split over two header files? Yes, there is. MPC8xx was the very first processor PPCBoot was developed on, and code cam from several incompatible sources. As usual, there was never enough time for a real cleanup. > thoughts? I doubt if this is really worth the efforts. MPC8xx is a dead horse, and has been so for a decade [which does not mean that there are not any products using it; even new ones...]. I guess MPC8xx will be removed in a not to far future... > i just noticed that none of the *_MASK macros are referenced > anywhere in the entire source tree: ... > so what are they used for? For completeness. Many chip vendors tend to creatye huge (tens of thousands of lines) header files for their chips to give names to each and every possible bit and mask combination. In the end, only a tiny percentage of this will be used. We never tried to clean up such files to include only used defines [which is probably a bad idea anyway, as the next driver might need just the defines you remove now.] Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk 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 I think that all right-thinking people in this country are sick and tired of being told that ordinary decent people are fed up in this country with being sick and tired. I'm certainly not. But I'm sick and tired of being told that I am. - Monty Python