2 * Copyright (c) 2010-2013 Xilinx, Inc. All rights reserved.
5 * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
6 * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
7 * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR
8 * STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION
9 * IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE
10 * FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
11 * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
12 * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO
13 * ANY WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE
14 * FROM CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY
15 * AND FITNESS FOR A PARTICULAR PURPOSE.
19 #ifndef __NETIF_XAXIEMACIF_H__
20 #define __NETIF_XAXIEMACIF_H__
26 #include "xlwipconfig.h"
27 #include "lwip/netif.h"
28 #include "netif/etharp.h"
29 #include "netif/xadapter.h"
31 #include "xparameters.h"
34 #include "xaxiethernet.h"
35 #ifdef XLWIP_CONFIG_INCLUDE_AXI_ETHERNET_FIFO
39 #include "xaxidma_hw.h"
42 #include "netif/xpqueue.h"
43 #include "xlwipconfig.h"
45 void xaxiemacif_setmac(u32_t index, u8_t *addr);
46 u8_t* xaxiemacif_getmac(u32_t index);
47 err_t xaxiemacif_init(struct netif *netif);
48 int xaxiemacif_input(struct netif *netif);
50 unsigned get_IEEE_phy_speed(XAxiEthernet *xaxiemacp);
51 unsigned configure_IEEE_phy_speed(XAxiEthernet *xaxiemacp, unsigned speed);
52 unsigned Phy_Setup (XAxiEthernet *xaxiemacp);
55 void xaxiemac_error_handler(XAxiEthernet * Temac);
57 /* structure within each netif, encapsulating all information required for
58 * using a particular temac instance
61 #ifdef XLWIP_CONFIG_INCLUDE_AXI_ETHERNET_FIFO
66 XAxiEthernet axi_ethernet;
68 /* queue to store overflow packets */
72 /* pointers to memory holding buffer descriptors (used only with SDMA) */
77 extern xaxiemacif_s xaxiemacif;
79 int is_tx_space_available(xaxiemacif_s *emac);
81 /* xaxiemacif_dma.c */
82 #ifndef XLWIP_CONFIG_INCLUDE_AXI_ETHERNET_FIFO
83 XStatus init_axi_dma(struct xemac_s *xemac);
84 int process_sent_bds(XAxiDma_BdRing *txring);
86 void axidma_send_handler(void *arg);
87 XStatus axidma_sgsend(xaxiemacif_s *xaxiemacif, struct pbuf *p);
94 #endif /* __NETIF_XAXIEMACIF_H__ */