]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
microblaze: Fix EMAC Lite initialization
authorNathan Rossi <nathan.rossi@xilinx.com>
Tue, 14 Apr 2015 06:16:39 +0000 (16:16 +1000)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 29 Apr 2015 08:22:25 +0000 (10:22 +0200)
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@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/microblaze-generic/microblaze-generic.c

index 3110405a1b615ad938b85df61ff88000feca21d1..375cd0b6feb9fc68641463f490d18c9c5603cf17 100644 (file)
@@ -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