From c1044a1ec182be4c9c0b64d42ac9bf8f623d3f68 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 12 Oct 2011 23:23:22 +0000 Subject: net: emaclite: Move RX/TX ping pong initialization to Init RX/TX ping pong directly from board not in the driver. Signed-off-by: Michal Simek --- board/xilinx/microblaze-generic/microblaze-generic.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'board/xilinx/microblaze-generic') diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 183e4dc8b8..9b2952f04e 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -71,12 +71,18 @@ int fsl_init2 (void) { int board_eth_init(bd_t *bis) { - /* - * This board either has PCI NICs or uses the CPU's TSECs - * pci_eth_init() will return 0 if no NICs found, so in that case - * returning -1 will force cpu_eth_init() to be called. - */ + int ret = 0; #ifdef CONFIG_XILINX_EMACLITE - return xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR); + u32 txpp = 0; + u32 rxpp = 0; +# ifdef CONFIG_XILINX_EMACLITE_TX_PING_PONG + txpp = 1; +# endif +# ifdef CONFIG_XILINX_EMACLITE_RX_PING_PONG + rxpp = 1; +# endif + ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR, + txpp, rxpp); #endif + return ret; } -- cgit v1.2.1