
On Wednesday 07 March 2012 13:03:57 Amit Virdi wrote:
From: Vipin KUMAR vipin.kumar@st.com
spear3xx and 6xx boards can be compiled in following configurations
- Environment placed in NAND
- console on usb device
- console on usb device with environment placed in NAND
Also, renaming the include/configs/spearxxx.h files to spear3xx_evb.h, spear6xx_evb.h etc to depict evaluation board configuration.
Some comments below.
Signed-off-by: Vipin Kumar vipin.kumar@st.com Signed-off-by: Amit Virdi amit.virdi@st.com
board/spear/spear300/config.mk | 13 +--------- board/spear/spear310/config.mk | 11 -------- board/spear/spear320/config.mk | 11 -------- board/spear/spear600/config.mk | 13 +--------- boards.cfg | 20 ++++++++++++--- doc/README.spear | 31 +++++++++++++++++------- include/configs/{spear3xx.h => spear3xx_evb.h} | 10 +++++++ include/configs/{spear6xx.h => spear6xx_evb.h} | 10 +++++++ 8 files changed, 60 insertions(+), 59 deletions(-) rename include/configs/{spear3xx.h => spear3xx_evb.h} (96%) rename include/configs/{spear6xx.h => spear6xx_evb.h} (89%)
diff --git a/board/spear/spear300/config.mk b/board/spear/spear300/config.mk index 5848ef8..0706430 100644 --- a/board/spear/spear300/config.mk +++ b/board/spear/spear300/config.mk @@ -25,15 +25,4 @@
CONFIG_SYS_TEXT_BASE = 0x00700000
-ALL-y += $(obj)u-boot.img
-# Environment variables in NAND -ifeq ($(ENV),NAND) -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND -else -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH -endif
-ifeq ($(CONSOLE),USB) -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY -endif +ALL += $(obj)u-boot.img
Can't you just remove this config.mk file completely? CONFIG_SYS_TEXT_BASE can be moved to the config header instead. What else is this file needed for?
The same comment for all other config.mk files.
<snip>
+++ b/include/configs/spear3xx_evb.h @@ -39,6 +39,16 @@ #define CONFIG_SPEAR320 1 #endif
+#if defined(CONFIG_usbtty) +#define CONFIG_SPEAR_USBTTY 1 +#endif
+#if defined(CONFIG_nand) +#define CONFIG_ENV_IS_IN_NAND 1 +#else +#define CONFIG_ENV_IS_IN_FLASH 1 +#endif
Please don't add the "1" here. Plain "#define CONFIG_xxx" should be enough.
#include <configs/spear-common.h>
/* Ethernet driver configuration */ diff --git a/include/configs/spear6xx.h b/include/configs/spear6xx_evb.h similarity index 89% rename from include/configs/spear6xx.h rename to include/configs/spear6xx_evb.h index c5bcc30..a61d9be 100644 --- a/include/configs/spear6xx.h +++ b/include/configs/spear6xx_evb.h @@ -30,6 +30,16 @@ */ #define CONFIG_SPEAR600 1
+#if defined(CONFIG_usbtty) +#define CONFIG_SPEAR_USBTTY 1 +#endif
+#if defined(CONFIG_nand) +#define CONFIG_ENV_IS_IN_NAND 1 +#else +#define CONFIG_ENV_IS_IN_FLASH 1 +#endif
Again.
Thanks, 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