
Hi Wolfgang,
On Wednesday 08 July 2009 22:01:23 Wolfgang Denk wrote:
Please move these CONFIG_SYS_* settings out of this file.
For me it is not acceptable to set configuration options in global header files like include/ppc4xx.h; CONFIG_* settings are supposed to be selected by the board configuration files, and only there.
I don't share this opinion. I think it's perfectly valid to enable CONFIG_* settings in global header files (or some other global files). Sometimes there are dependencies that can (or even should) be solved this way. One example is the 4xx NAND driver which needs to configure/set CONFIG_MTD_NAND_ECC_SMC for correct operation. This is currently done directly in
In such a case please do not name the varoable CONFIG_.
I didn't "name" it this way. It's a plain copy from Linux. And this is done intentionally so that we can easily "borrow" code from there. Changing it's name (and this is just one example, there are most likely many of those ones) into something else would be plain stupid from my point of view.
Rule is: CONFIG_* and CONFIG_SYS_* are to be set / unset in the board configuration files only (eventually with help of trickery from the top level Makefile).
Then please grep for "#define CONFIG_" in the include directory. You will be surprised how many of these defines there are outside of the include/configs directory.
Best regards, 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@denx.de =====================================================================