]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: Build the ethernet for respective boards only.
authorJagan <jaganna@xilinx.com>
Mon, 28 May 2012 12:24:06 +0000 (17:54 +0530)
committerJagan <jaganna@xilinx.com>
Thu, 31 May 2012 07:57:02 +0000 (13:27 +0530)
Few of the DC varients on zc770 doesn't have net support,
so we make the ethernet as conditional compilation
for respective boards.

Signed-off-by: Jagan <jaganna@xilinx.com>
board/xilinx/zynq_common/Makefile
board/xilinx/zynq_common/board.c
board/xilinx/zynq_common/xilinx_nandpss.c
include/configs/zynq_zc770.h

index a7a0bf54c30fa0fcbf95df06044581ac92d7d0ac..8e912055bb4319c24a4e5849231d91a6ae0cae41 100644 (file)
@@ -29,10 +29,11 @@ endif
 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 \
           ../common/xbasic_types.o
 
+COBJS-$(CONFIG_CMD_NET) += xemacpss_g.o xemacpss_control.o \
+               xemacpss_sinit.o xemacpss_bdring.o \
+               xemacpss.o xgmac.o
 COBJS-$(CONFIG_CMD_SPI) += pele_qspi.o xilinx_qspipss.o
 COBJS-$(CONFIG_CMD_NAND) += xilinx_nandpss.o
 COBJS-$(CONFIG_CMD_MMC) += mmc.o
index 26a75ad62b0e2c0a0abcc6f9dbf9cde72b947b13..5a1da9f894027f55e7f74cfa6c63400f10a43f40 100644 (file)
@@ -637,6 +637,7 @@ int board_late_init (void)
        return 0;
 }
 
+#ifdef CONFIG_CMD_NET
 extern int Xgmac_register(bd_t *bis);
 
 int board_eth_init(bd_t *bis)
@@ -645,6 +646,7 @@ int board_eth_init(bd_t *bis)
 
        return 0;
 }
+#endif
 
 int dram_init(void)
 {
index 25017712396d843625cd10341e83277581b9a074..f237e65399e4d30ade6accc19ebe6f80f944f90f 100644 (file)
 #include <linux/mtd/nand_ecc.h>
 #include "xilinx_nand_smc.h"
 
+/* Data Memory Barrier */
+#define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
+#define SYNCHRONIZE_IO dmb()
+
+void XIo_Out32(u32 OutAddress, u32 Value)
+{
+       *(volatile u32 *) OutAddress = Value;
+       SYNCHRONIZE_IO;
+}
+
+u32 XIo_In32(u32 InAddress)
+{
+       volatile u32 * temp = *(volatile u32 *)InAddress;
+       SYNCHRONIZE_IO;
+       return temp;
+}
+
 /********** stubs - Make Linux code compile in this environment **************/
 #define EIO              5
 #define ENXIO            6
index 27d9319b552bb5104708775ae998ec669823faf2..280236bfc03a4512a49dabaab79539041e1e2fe5 100644 (file)
@@ -84,7 +84,6 @@
 
 #include <config_cmd_default.h>        
 #define CONFIG_CMD_DATE                /* RTC? */
-#define CONFIG_CMD_PING                /* Might be useful for debugging */
 #define CONFIG_CMD_SAVEENV     /* Command to save ENV to Flash */
 #define CONFIG_REGINFO         /* Again, debugging */
 #undef CONFIG_CMD_SETGETDCR    /* README says 4xx only */
 #define CONFIG_UART1                   1
 #else
 #define CONFIG_UART0                   1
+#endif
+
+ /*
+ * Ethernet Settings
+ */
+#if defined(CONFIG_ZC770_XM010) || defined(CONFIG_ZC770_XM013)
+#define CONFIG_CMD_PING                /* Might be useful for debugging */
+#define CONFIG_NET_MULTI
+#define CONFIG_XGMAC_PHY_ADDR 0x7
+#else
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
+#undef CONFIG_BOOTM_NETBSD
 #endif
 
 /*
 /* 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)