[U-Boot] [PATCH] microblaze: Fix EMAC Lite initialization

Nathan Rossi nathan.rossi at xilinx.com
Tue Apr 14 08:16:39 CEST 2015


It is possible for CONFIG_XILINX_EMACLITE to be defined without
XILINX_EMACLITE_BASEADDR being defined as the EMAC Lite driver support
OF init. Check that the driver is enabled and the base address is
available before initializing with a static base address.

Signed-off-by: Nathan Rossi <nathan.rossi at xilinx.com>
---
 board/xilinx/microblaze-generic/microblaze-generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 3110405..375cd0b 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -109,7 +109,7 @@ int board_eth_init(bd_t *bis)
 						XILINX_AXIDMA_BASEADDR);
 #endif
 
-#ifdef CONFIG_XILINX_EMACLITE
+#if defined(CONFIG_XILINX_EMACLITE) && defined(XILINX_EMACLITE_BASEADDR)
 	u32 txpp = 0;
 	u32 rxpp = 0;
 # ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG
-- 
1.7.10.4



More information about the U-Boot mailing list