Patchwork [U-Boot,7/8] microblaze: Wire up axi_ethernet driver initialization

login
register
mail settings
Submitter Michal Simek
Date Aug. 31, 2011, 10:57 a.m.
Message ID <1314788276-26107-8-git-send-email-monstr@monstr.eu>
Download mbox | patch
Permalink /patch/112533/
State Superseded
Headers show

Comments

Michal Simek - Aug. 31, 2011, 10:57 a.m.
Initialize axi_ethernet driver.

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 .../xilinx/microblaze-generic/microblaze-generic.c |    6 ++++++
 include/configs/microblaze-generic.h               |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)

Patch

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 87acc6b..955cc34 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -72,6 +72,12 @@  int fsl_init2 (void) {
 int board_eth_init(bd_t *bis)
 {
 	int ret = 0;
+
+#ifdef CONFIG_XILINX_AXIEMAC
+	ret |= xilinx_axiemac_initialize(bis, XILINX_AXIEMAC_BASEADDR,
+						XILINX_AXIDMA_BASEADDR);
+#endif
+
 #ifdef CONFIG_XILINX_EMACLITE
 	u32 txpp = 0;
 	u32 rxpp = 0;
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 4c76afd..f56d0e2 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -71,6 +71,10 @@ 
 # define CONFIG_XILINX_LL_TEMAC	1
 # define CONFIG_SYS_ENET
 #endif
+#if defined(XILINX_AXIEMAC_BASEADDR)
+# define CONFIG_XILINX_AXIEMAC	1
+# define CONFIG_SYS_ENET
+#endif
 
 #undef ET_DEBUG