From: Michal Simek Date: Fri, 12 Apr 2013 14:33:08 +0000 (+0200) Subject: zynq: Move macros to hardware.h X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5218ca14d5580e9241305e4abe67f961dca8c00a;p=thirdparty%2Fu-boot.git zynq: Move macros to hardware.h Add all fixed addresses to hardware.h and change petalinux configuration to support this. Signed-off-by: Michal Simek --- diff --git a/arch/arm/include/asm/arch-zynq/hardware.h b/arch/arm/include/asm/arch-zynq/hardware.h index 6c9b97d703b..a61eb2f59eb 100644 --- a/arch/arm/include/asm/arch-zynq/hardware.h +++ b/arch/arm/include/asm/arch-zynq/hardware.h @@ -27,6 +27,8 @@ #define ZYNQ_DEV_CFG_APB_BASEADDR 0xF8007000 #define ZYNQ_SCU_BASEADDR 0xF8F00000 #define ZYNQ_SCUTIMER_BASEADDR 0xF8F00600 +#define ZYNQ_GEM_BASEADDR0 0xE000B000 +#define ZYNQ_GEM_BASEADDR1 0xE000C000 /* Reflect slcr offsets */ struct slcr_regs { diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index b57a740f45a..6abc2e329c9 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -24,6 +24,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -142,13 +143,14 @@ int board_eth_init(bd_t *bis) #endif #if defined(CONFIG_ZYNQ_GEM) -# if defined(CONFIG_ZYNQ_GEM_BASEADDR0) - ret |= zynq_gem_initialize(bis, CONFIG_ZYNQ_GEM_BASEADDR0); +# if defined(CONFIG_ZYNQ_GEM0) + ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR0); # endif -# if defined(CONFIG_ZYNQ_GEM_BASEADDR1) - ret |= zynq_gem_initialize(bis, CONFIG_ZYNQ_GEM_BASEADDR1); +# if defined(CONFIG_ZYNQ_GEM1) + ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR1); # endif #endif + return ret; } #endif diff --git a/include/configs/petalogix-arm-auto.h b/include/configs/petalogix-arm-auto.h index 3a987a92c65..7a66566a3c1 100644 --- a/include/configs/petalogix-arm-auto.h +++ b/include/configs/petalogix-arm-auto.h @@ -19,8 +19,12 @@ #define XPSS_QSPI_BASEADDR XILINX_PS7_QSPI_FLASH_BASEADDR #endif -#ifdef XILINX_PS7_GEM_BASEADDR -#define CONFIG_ZYNQ_GEM_BASEADDR0 XILINX_PS7_GEM_BASEADDR +#if defined(XILINX_PS7_GEM_BASEADDR) +# if (XILINX_PS7_GEM_BASEADDR == ZYNQ_GEM_BASEADDR0) +# define CONFIG_ZYNQ_GEM0 +# else +# define CONFIG_ZYNQ_GEM1 +# endif #endif #define CONFIG_SYS_CACHELINE_SIZE 32 /* Assuming bytes? */ diff --git a/include/configs/zynq.h b/include/configs/zynq.h index 11476894d32..ebe1b1bc05a 100644 --- a/include/configs/zynq.h +++ b/include/configs/zynq.h @@ -53,7 +53,7 @@ /* Ethernet driver */ #define CONFIG_NET_MULTI #define CONFIG_ZYNQ_GEM -#define CONFIG_ZYNQ_GEM_BASEADDR0 0xE000B000 +#define CONFIG_ZYNQ_GEM0 #if defined(CONFIG_ZYNQ_DCC) # define CONFIG_ARM_DCC diff --git a/include/configs/zynq_common.h b/include/configs/zynq_common.h index 807deaee62e..77df3eceb7d 100644 --- a/include/configs/zynq_common.h +++ b/include/configs/zynq_common.h @@ -59,14 +59,6 @@ #endif /* Ethernet driver */ -#ifdef CONFIG_ZYNQ_GEM0 -# define CONFIG_ZYNQ_GEM_BASEADDR0 0xE000B000 -#endif - -#ifdef CONFIG_ZYNQ_GEM1 -# define CONFIG_ZYNQ_GEM_BASEADDR1 0xE000C000 -#endif - #if defined(CONFIG_ZYNQ_GEM0) || defined(CONFIG_ZYNQ_GEM1) # define CONFIG_NET_MULTI # define CONFIG_ZYNQ_GEM