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
return 0;
}
+#ifdef CONFIG_CMD_NET
extern int Xgmac_register(bd_t *bis);
int board_eth_init(bd_t *bis)
return 0;
}
+#endif
int dram_init(void)
{
#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
#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)