1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
2 /* Copyright 2019 NXP */
3 #ifndef DPAA2_MAC_H
4 #define DPAA2_MAC_H
5 
6 #include <linux/of.h>
7 #include <linux/of_mdio.h>
8 #include <linux/of_net.h>
9 #include <linux/phylink.h>
10 
11 #include "dpmac.h"
12 #include "dpmac-cmd.h"
13 
14 struct dpaa2_mac {
15 	struct fsl_mc_device *mc_dev;
16 	struct dpmac_link_state state;
17 	struct net_device *net_dev;
18 	struct fsl_mc_io *mc_io;
19 
20 	struct phylink_config phylink_config;
21 	struct phylink *phylink;
22 	phy_interface_t if_mode;
23 };
24 
25 bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev,
26 			     struct fsl_mc_io *mc_io);
27 
28 int dpaa2_mac_connect(struct dpaa2_mac *mac);
29 
30 void dpaa2_mac_disconnect(struct dpaa2_mac *mac);
31 
32 int dpaa2_mac_get_sset_count(void);
33 
34 void dpaa2_mac_get_strings(u8 *data);
35 
36 void dpaa2_mac_get_ethtool_stats(struct dpaa2_mac *mac, u64 *data);
37 
38 #endif /* DPAA2_MAC_H */
39