From: Wolfgang Denk Date: Tue, 25 Oct 2011 20:50:33 +0200 Subject: [U-Boot] [PATCH] ARM: orion5x: reduce dependence of including platform file In-Reply-To: References: <4EA5966C.5040609@aribaud.net> <1319509652-5648-1-git-send-email-leiwen@marvell.com> <20111025074349.83D561408EA7@gemini.denx.de> Message-ID: <20111025185033.426E11408759@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 Lei Wen, In message you wrote: > > >> +#include > > > > I don't like this. > > > > > > Board config files MUST NOT do any such includes. Keep in mind that > > one day we might want to try something like Kconfig, so board config > > files should ONLY contain configuration information in the form of > > #define's and the like. > > > > NAK. > > I should admit I have some bit of confusing here... > What I see there are lots of include in the config file, 742 include > usage case in the config files...: > $ grep -Rn "#include" include/configs | wc -l > 742 There are includes. Some of them are OK, some aren't and should be fixed. More than half of your number are "#include " which are perfectly fine. For example, it's also perfectly fine if all boards that are similar or that provide a similar look & feel (for example, because they come from a single vendor) include a common configuration file. Such examples are #include "amcc-common.h", #include "mv-common.h", #include , #include "manroland/common.h", etc. etc. etc. On the other hand, files from asm/arch/* should never define any config settings - if it cannot be avoided they may provide register definitions and the like, but any "#define CONFIG_*" has no place there. 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 Our business is run on trust. We trust you will pay in advance.