drm/rockchip: Don't change hdmi reference clock rate
[drm/drm-misc.git] / drivers / net / ethernet / apm / xgene-v2 / main.h
blob7be6f83e22fe093dbf607250acda3417ee367421
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
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>
8 */
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>
18 #include <linux/io.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>
26 #include <net/ip.h>
27 #include "mac.h"
28 #include "enet.h"
29 #include "ring.h"
30 #include "ethtool.h"
32 #define XGENE_ENET_STD_MTU 1536
33 #define XGENE_ENET_MIN_FRAME 60
34 #define IRQ_ID_SIZE 16
36 struct xge_resource {
37 void __iomem *base_addr;
38 int phy_mode;
39 u32 irq;
42 struct xge_stats {
43 u64 tx_packets;
44 u64 tx_bytes;
45 u64 rx_packets;
46 u64 rx_bytes;
47 u64 rx_errors;
50 /* ethernet private data */
51 struct xge_pdata {
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;
61 int phy_speed;
62 u8 nbufs;
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__ */