2 * Applied Micro X-Gene SoC Ethernet v2 Driver
4 * Copyright (c) 2017, Applied Micro Circuits Corporation
5 * Author(s): Iyappan Subramanian <isubramanian@apm.com>
6 * Keyur Chudgar <kchudgar@apm.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef __XGENE_ENET_V2_MAIN_H__
23 #define __XGENE_ENET_V2_MAIN_H__
25 #include <linux/acpi.h>
26 #include <linux/clk.h>
27 #include <linux/efi.h>
28 #include <linux/if_vlan.h>
29 #include <linux/irq.h>
31 #include <linux/module.h>
32 #include <linux/of_platform.h>
33 #include <linux/of_net.h>
34 #include <linux/of_mdio.h>
35 #include <linux/prefetch.h>
36 #include <linux/phy.h>
43 #define XGENE_ENET_V2_VERSION "v1.0"
44 #define XGENE_ENET_STD_MTU 1536
45 #define XGENE_ENET_MIN_FRAME 60
46 #define IRQ_ID_SIZE 16
49 void __iomem
*base_addr
;
62 /* ethernet private data */
64 struct xge_resource resources
;
65 struct xge_desc_ring
*tx_ring
;
66 struct xge_desc_ring
*rx_ring
;
67 struct platform_device
*pdev
;
68 char irq_name
[IRQ_ID_SIZE
];
69 struct mii_bus
*mdio_bus
;
70 struct net_device
*ndev
;
71 struct napi_struct napi
;
72 struct xge_stats stats
;
77 int xge_mdio_config(struct net_device
*ndev
);
78 void xge_mdio_remove(struct net_device
*ndev
);
80 #endif /* __XGENE_ENET_V2_MAIN_H__ */