Patchwork [U-Boot,3/3] microblaze: Wire up LL_TEMAC driver initialization

login
register
mail settings
Submitter Stephan Linz
Date Dec. 21, 2011, 7:28 p.m.
Message ID <1324495689-3970-3-git-send-email-linz@li-pro.net>
Download mbox | patch
Permalink /patch/132724/
State Not Applicable
Delegated to: Michal Simek
Headers show

Comments

Stephan Linz - Dec. 21, 2011, 7:28 p.m.
From: Michal Simek <monstr@monstr.eu>

Initialize ll_temac driver.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 .../xilinx/microblaze-generic/microblaze-generic.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

Patch

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index c4c13a6..955cc34 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -90,5 +90,21 @@  int board_eth_init(bd_t *bis)
 	ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR,
 			txpp, rxpp);
 #endif
+
+#ifdef CONFIG_XILINX_LL_TEMAC
+# ifdef XILINX_LLTEMAC_FIFO_BASEADDR
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					0, XILINX_LLTEMAC_FIFO_BASEADDR);
+# elif XILINX_LLTEMAC_SDMA_CTRL_BASEADDR
+#  if XILINX_LLTEMAC_SDMA_USE_DCR == 1
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					3, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR);
+#  else
+	ret |= xilinx_ll_temac_initialize(bis, XILINX_LLTEMAC_BASEADDR,
+					1, XILINX_LLTEMAC_SDMA_CTRL_BASEADDR);
+#  endif
+# endif
+#endif
+
 	return ret;
 }