spear3xx and 6xx boards can be compiled in following configurations
1. Environment placed in NAND
2. console on usb device
3. console on usb device with environment placed in NAND

Signed-off-by: Vipin Kumar <vipin.ku...@st.com>
---
 Makefile                       |   16 ++++++++++++++--
 board/spear/spear300/config.mk |   11 -----------
 board/spear/spear310/config.mk |   11 -----------
 board/spear/spear320/config.mk |   11 -----------
 board/spear/spear600/config.mk |   11 -----------
 include/configs/spear3xx.h     |   10 ++++++++++
 include/configs/spear6xx.h     |   10 ++++++++++
 7 files changed, 34 insertions(+), 46 deletions(-)

diff --git a/Makefile b/Makefile
index 7af505e..04b9cc7 100644
--- a/Makefile
+++ b/Makefile
@@ -3038,11 +3038,23 @@ smdk2410_config :       unconfig
        @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0
 
 spear300_config \
+spear300_nand_config \
+spear300_usbtty_config \
+spear300_usbtty_nand_config \
 spear310_config \
-spear320_config :      unconfig
+spear310_nand_config \
+spear310_usbtty_config \
+spear310_usbtty_nand_config \
+spear320_config \
+spear320_nand_config \
+spear320_usbtty_config \
+spear320_usbtty_nand_config :  unconfig
        @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx arm arm926ejs 
$(@:_config=) spear spear
 
-spear600_config :      unconfig
+spear600_config \
+spear600_nand_config \
+spear600_usbtty_config \
+spear600_usbtty_nand_config :  unconfig
        @$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx arm arm926ejs 
$(@:_config=) spear spear
 
 spear1300_config \
diff --git a/board/spear/spear300/config.mk b/board/spear/spear300/config.mk
index 35646f2..0bbb40f 100644
--- a/board/spear/spear300/config.mk
+++ b/board/spear/spear300/config.mk
@@ -26,14 +26,3 @@
 TEXT_BASE = 0x00700000
 
 ALL += $(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
diff --git a/board/spear/spear310/config.mk b/board/spear/spear310/config.mk
index cba8436..c8264c3 100644
--- a/board/spear/spear310/config.mk
+++ b/board/spear/spear310/config.mk
@@ -27,18 +27,7 @@ TEXT_BASE = 0x00700000
 
 ALL += $(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
-
 # Support parallel flash
 ifeq ($(FLASH),PNOR)
 PLATFORM_RELFLAGS += -DCONFIG_FLASH_PNOR
 endif
-
-ifeq ($(CONSOLE),USB)
-PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY
-endif
diff --git a/board/spear/spear320/config.mk b/board/spear/spear320/config.mk
index cba8436..c8264c3 100644
--- a/board/spear/spear320/config.mk
+++ b/board/spear/spear320/config.mk
@@ -27,18 +27,7 @@ TEXT_BASE = 0x00700000
 
 ALL += $(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
-
 # Support parallel flash
 ifeq ($(FLASH),PNOR)
 PLATFORM_RELFLAGS += -DCONFIG_FLASH_PNOR
 endif
-
-ifeq ($(CONSOLE),USB)
-PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY
-endif
diff --git a/board/spear/spear600/config.mk b/board/spear/spear600/config.mk
index 35646f2..0bbb40f 100644
--- a/board/spear/spear600/config.mk
+++ b/board/spear/spear600/config.mk
@@ -26,14 +26,3 @@
 TEXT_BASE = 0x00700000
 
 ALL += $(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
diff --git a/include/configs/spear3xx.h b/include/configs/spear3xx.h
index 581f28d..7d4d8e0 100644
--- a/include/configs/spear3xx.h
+++ b/include/configs/spear3xx.h
@@ -39,6 +39,16 @@
 #define CONFIG_SPEAR320                                1
 #endif
 
+#if defined(CONFIG_MK_usbtty)
+#define CONFIG_SPEAR_USBTTY                    1
+#endif
+
+#if defined(CONFIG_MK_nand)
+#define CONFIG_ENV_IS_IN_NAND                  1
+#else
+#define CONFIG_ENV_IS_IN_FLASH                 1
+#endif
+
 #include <configs/spear-common.h>
 
 /* Ethernet driver configuration */
diff --git a/include/configs/spear6xx.h b/include/configs/spear6xx.h
index 24a6948..1930fad 100644
--- a/include/configs/spear6xx.h
+++ b/include/configs/spear6xx.h
@@ -30,6 +30,16 @@
  */
 #define CONFIG_SPEAR600                                1
 
+#if defined(CONFIG_MK_usbtty)
+#define CONFIG_SPEAR_USBTTY                    1
+#endif
+
+#if defined(CONFIG_MK_nand)
+#define CONFIG_ENV_IS_IN_NAND                  1
+#else
+#define CONFIG_ENV_IS_IN_FLASH                 1
+#endif
+
 #include <configs/spear-common.h>
 
 /* Serial Configuration (PL011) */
-- 
1.6.0.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to