[U-Boot] more "#if 0" pedantry related to moving macros in header files
Wolfgang Denk
wd at denx.de
Mon Jul 18 21:31:20 CEST 2016
Dear "Robert P. J. Day",
In message <alpine.LFD.2.20.1607170619400.5907 at localhost.localdomain> 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
More information about the U-Boot
mailing list