]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/commitdiff
zynq: Move macros to hardware.h
authorMichal Simek <michal.simek@xilinx.com>
Fri, 12 Apr 2013 14:33:08 +0000 (16:33 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 30 Apr 2013 09:39:21 +0000 (11:39 +0200)
Add all fixed addresses to hardware.h and change petalinux
configuration to support this.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@ti.com>
arch/arm/include/asm/arch-zynq/hardware.h
board/xilinx/zynq/board.c
include/configs/zynq.h

index d8e378ff55952f2c9787a109070f2237ecf804c1..5820f3b922e4a9652e0746c3eeb2db3ff5cffa63 100644 (file)
@@ -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 {
index 8ed75c3d383ec543ab9642b7b3d5d116e17cda13..3af18f0d56f3568dd57160b5de8ca54bb241c03e 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <common.h>
 #include <netdev.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/sys_proto.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -38,10 +40,14 @@ int board_eth_init(bd_t *bis)
 {
        u32 ret = 0;
 
-#if defined(CONFIG_ZYNQ_GEM) && defined(CONFIG_ZYNQ_GEM_BASEADDR0)
-       ret = zynq_gem_initialize(bis, CONFIG_ZYNQ_GEM_BASEADDR0);
+#if defined(CONFIG_ZYNQ_GEM)
+# if defined(CONFIG_ZYNQ_GEM0)
+       ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR0);
+# endif
+# if defined(CONFIG_ZYNQ_GEM1)
+       ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR1);
+# endif
 #endif
-
        return ret;
 }
 #endif
index 11476894d32845e1766ce118750bf451a35c5808..ebe1b1bc05adfd9af1189bfa87340c280ef1191d 100644 (file)
@@ -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