[U-Boot] [PATCH v2 17/17] SPEAr : Supporting various configurations for spear3xx and spear6xx boards

Tom Rix tom at bumblecow.com
Mon May 3 02:38:43 CEST 2010


Vipin KUMAR wrote:
> 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
> 

Add the new configs to the README.spear
Tom



> Signed-off-by: Vipin Kumar <vipin.kumar at 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 0b6a151..4cc9913 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3034,11 +3034,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 fde505c..f0c915e 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 2532344..82d24df 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) */



More information about the U-Boot mailing list