1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Applied Micro X-Gene SoC Ethernet v2 Driver
5 * Copyright (c) 2017, Applied Micro Circuits Corporation
6 * Author(s): Iyappan Subramanian <isubramanian@apm.com>
7 * Keyur Chudgar <kchudgar@apm.com>
10 #ifndef __XGENE_ENET_V2_MAIN_H__
11 #define __XGENE_ENET_V2_MAIN_H__
13 #include <linux/acpi.h>
14 #include <linux/clk.h>
15 #include <linux/efi.h>
16 #include <linux/if_vlan.h>
17 #include <linux/irq.h>
19 #include <linux/module.h>
20 #include <linux/of_platform.h>
21 #include <linux/of_net.h>
22 #include <linux/of_mdio.h>
23 #include <linux/prefetch.h>
24 #include <linux/phy.h>
25 #include <linux/platform_device.h>
32 #define XGENE_ENET_STD_MTU 1536
33 #define XGENE_ENET_MIN_FRAME 60
34 #define IRQ_ID_SIZE 16
37 void __iomem
*base_addr
;
50 /* ethernet private data */
52 struct xge_resource resources
;
53 struct xge_desc_ring
*tx_ring
;
54 struct xge_desc_ring
*rx_ring
;
55 struct platform_device
*pdev
;
56 char irq_name
[IRQ_ID_SIZE
];
57 struct mii_bus
*mdio_bus
;
58 struct net_device
*ndev
;
59 struct napi_struct napi
;
60 struct xge_stats stats
;
65 int xge_mdio_config(struct net_device
*ndev
);
66 void xge_mdio_remove(struct net_device
*ndev
);
68 #endif /* __XGENE_ENET_V2_MAIN_H__ */