From: Jagan Date: Mon, 28 May 2012 06:10:43 +0000 (+0530) Subject: Xilinx: ARM: Make a single config file for all ZC770 DC varients X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d42525cff0e1b6bac4d33931e38e7379f8e7f71;p=thirdparty%2Fu-boot.git Xilinx: ARM: Make a single config file for all ZC770 DC varients This patch prevents the duplication of different config files for different DC varients on ZC770. now, We have a common config file zynq_zc770.h for configure we just do make zynq_zc770__config As we have a common config's for individual DC's at a time, we just compile only respective drivers on board Makefile. Signed-off-by: Jagan --- diff --git a/board/xilinx/dfe/Makefile b/board/xilinx/dfe/Makefile index 42bf8ffe948..a7a0bf54c30 100644 --- a/board/xilinx/dfe/Makefile +++ b/board/xilinx/dfe/Makefile @@ -31,12 +31,11 @@ LIB = $(obj)lib$(BOARD).o COBJS-y := board.o \ xemacpss_g.o xemacpss_control.o xemacpss_sinit.o \ xemacpss_bdring.o xemacpss.o xgmac.o \ - xilinx_qspipss.o \ - pele_qspi.o \ - mmc.o \ ../common/xbasic_types.o +COBJS-$(CONFIG_CMD_SPI) += pele_qspi.o xilinx_qspipss.o COBJS-$(CONFIG_CMD_NAND) += xilinx_nandpss.o +COBJS-$(CONFIG_CMD_MMC) += mmc.o COBJS := $(sort $(COBJS-y)) diff --git a/boards.cfg b/boards.cfg index ca85461833f..8b45c0362df 100644 --- a/boards.cfg +++ b/boards.cfg @@ -127,7 +127,10 @@ omap4_panda arm armv7 panda ti omap4_sdp4430 arm armv7 sdp4430 ti omap4 xpele arm armv7 dfe xilinx pele zynq_zc702 arm armv7 dfe xilinx pele -zynq_zc770 arm armv7 dfe xilinx pele +zynq_zc770_XM010 arm armv7 dfe xilinx pele zynq_zc770:ZC770_XM010 +zynq_zc770_XM011 arm armv7 dfe xilinx pele zynq_zc770:ZC770_XM011 +zynq_zc770_XM012 arm armv7 dfe xilinx pele zynq_zc770:ZC770_XM012 +zynq_zc770_XM013 arm armv7 dfe xilinx pele zynq_zc770:ZC770_XM013 s5p_goni arm armv7 goni samsung s5pc1xx smdkc100 arm armv7 smdkc100 samsung s5pc1xx s5pc210_universal arm armv7 universal_c210 samsung s5pc2xx diff --git a/include/configs/zynq_zc770.h b/include/configs/zynq_zc770.h index 621dad66927..e35925dee93 100644 --- a/include/configs/zynq_zc770.h +++ b/include/configs/zynq_zc770.h @@ -11,13 +11,7 @@ #define CONFIG_DFE 1 /* Board sub-type ("flavor"?) */ #define CONFIG_PELE 1 /* SoC? */ -/* Select board: comment out all but one. */ - -#define CONFIG_ZC770_XM010 -//#define CONFIG_ZC770_XM011 -//#define CONFIG_ZC770_XM010_XM011 - -# include "../board/xilinx/dfe/xparameters_zynq.h" +#include "../board/xilinx/dfe/xparameters_zynq.h" #define CONFIG_SYS_TEXT_BASE 0x04000000 @@ -72,8 +66,6 @@ go 0x8000\0" -#undef CONFIG_PELE_XIL_LQSPI - /* default boot is according to the bootmode switch settings */ #define CONFIG_BOOTCOMMAND "run modeboot" @@ -84,8 +76,11 @@ #define CONFIG_PSS_SERIAL #define CONFIG_RTC_XPSSRTC -/* Uncomment it if you don't want Flash */ -//#define CONFIG_SYS_NO_FLASH +#if defined(CONFIG_ZC770_XM012) +#undef CONFIG_SYS_NO_FLASH +#else +#define CONFIG_SYS_NO_FLASH +#endif #include #define CONFIG_CMD_DATE /* RTC? */ @@ -116,6 +111,10 @@ //#define CONFIG_PELE_INIT_GEM //this is to initialize GEM at uboot start #define CONFIG_PELE_IP_ENV //this is to set ipaddr, ethaddr and serverip env variables. +#if defined(CONFIG_ZC770_XM010) || defined(CONFIG_ZC770_XM012) +/* Place a Xilinx Boot ROM header in u-boot image? */ +#define CONFIG_PELE_XILINX_FLASH_HEADER +#endif #ifndef CONFIG_SYS_NO_FLASH @@ -143,6 +142,9 @@ #else # define CONFIG_ENV_IS_NOWHERE 1 #endif +#ifdef CONFIG_PELE_XILINX_FLASH_HEADER +#define CONFIG_PELE_XIP_START CONFIG_SYS_FLASH_BASE +#endif #else #define CONFIG_ENV_IS_NOWHERE 1 @@ -168,11 +170,6 @@ #define CONFIG_XDF_UART 1 #define CONFIG_XDF_ETH 1 #define CONFIG_XDF_RTC 1 -# define CONFIG_UART1 1 -#define CONFIG_TTC0 1 -#define CONFIG_GEM0 1 -#define CONFIG_NET_MULTI -#define CONFIG_XGMAC_PHY_ADDR 0x7 #define TIMER_INPUT_CLOCK XPAR_CPU_CORTEXA9_CORE_CLOCK_FREQ_HZ / 2 #define CONFIG_TIMER_PRESCALE 255 @@ -199,26 +196,50 @@ #define CONFIG_SYS_CBSIZE 256 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* phycore */ +#if defined(CONFIG_ZC770_XM010) || defined(CONFIG_ZC770_XM011) \ + || defined(CONFIG_ZC770_XM012) +#define CONFIG_UART1 1 +#else +#define CONFIG_UART0 1 +#endif + /* * SPI Settings */ +#if defined(CONFIG_ZC770_XM010) || defined(CONFIG_ZC770_XM013) #define CONFIG_CMD_SPI #define CONFIG_ENV_SPI_MAX_HZ 30000000 #define CONFIG_SF_DEFAULT_SPEED 30000000 #define CONFIG_SPI_FLASH #define CONFIG_CMD_SF -/* #define CONFIG_XILINX_PSS_QSPI_USE_DUAL_FLASH */ -#ifdef NOTOW_BHILL -#define CONFIG_SPI_FLASH_ATMEL + +#ifdef CONFIG_PELE_XILINX_FLASH_HEADER +/* Address Xilinx boot rom should use to launch u-boot */ +#define CONFIG_PELE_XIP_START XPSS_QSPI_LIN_BASEADDR +#endif + +/* common net settings */ +#define CONFIG_NET_MULTI +#define CONFIG_XGMAC_PHY_ADDR 0x7 +#endif + +#if defined(CONFIG_ZC770_XM013) +#define CONFIG_GEM1 1 +#define CONFIG_TTC1 1 #define CONFIG_SPI_FLASH_SPANSION -#define CONFIG_SPI_FLASH_WINBOND +#define CONFIG_XILINX_PSS_QSPI_USE_DUAL_FLASH #endif + +#if defined(CONFIG_ZC770_XM010) +#define CONFIG_GEM0 1 +#define CONFIG_TTC0 1 #define CONFIG_SPI_FLASH_STMICRO +#endif /* * NAND Flash settings */ -#if defined(CONFIG_ZC770_XM011) || defined(CONFIG_ZC770_XM010_XM011) +#if defined(CONFIG_ZC770_XM011) #define CONFIG_CMD_NAND #define CONFIG_CMD_NAND_LOCK_UNLOCK #define CONFIG_SYS_MAX_NAND_DEVICE 1 @@ -226,19 +247,7 @@ #define CONFIG_MTD_DEVICE #endif -/* Place a Xilinx Boot ROM header in u-boot image? */ -#define CONFIG_PELE_XILINX_FLASH_HEADER - -#ifdef CONFIG_PELE_XILINX_FLASH_HEADER -/* Address Xilinx boot rom should use to launch u-boot */ -#ifdef CONFIG_PELE_XIL_LQSPI -#define CONFIG_PELE_XIP_START XPSS_QSPI_LIN_BASEADDR -#else -/* NOR */ -#define CONFIG_PELE_XIP_START CONFIG_SYS_FLASH_BASE -#endif -#endif - +#if defined(CONFIG_ZC770_XM010) /* Secure Digital */ #define CONFIG_MMC 1 @@ -249,6 +258,7 @@ #define CONFIG_CMD_EXT2 #define CONFIG_DOS_PARTITION #endif +#endif #define BOARD_LATE_INIT 1