]> git.ipfire.org Git - thirdparty/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>
Thu, 25 Apr 2013 14:55:46 +0000 (16:55 +0200)
Add all fixed addresses to hardware.h and change petalinux
configuration to support this.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/include/asm/arch-zynq/hardware.h
board/xilinx/zynq/board.c
include/configs/petalogix-arm-auto.h
include/configs/zynq.h
include/configs/zynq_common.h

index 6c9b97d703bc9f268d062fc21b3e49039c42230f..a61eb2f59eb9b1b9550a467e6efbc27ffc7857dc 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 b57a740f45a2c58d3ca56e0c2144f10b5eabf874..6abc2e329c9714bd58be97bec5ebbbb329ab8e02 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <netdev.h>
 #include <zynqpl.h>
+#include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 
 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
index 3a987a92c6596912b2d2495706ab7a415143b38e..7a66566a3c1a22cc06aa75ba814687ae4c8060a9 100644 (file)
 #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? */
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
index 807deaee62ed8ed93062fce9dd57482218b31822..77df3eceb7d3d6c10e9af6e8e07bec183f2606a7 100644 (file)
 #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