mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-06 02:24:14 +08:00
095dca16d9
Split up the initialization phase of the dpmac object from actually configuring the phylink instance, connecting to it and configuring the MAC. This is done so that even though the dpni object is connected to a dpmac which has link management handled by the firmware we are still able to export the MAC counters. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
|
|
/* Copyright 2019 NXP */
|
|
#ifndef DPAA2_MAC_H
|
|
#define DPAA2_MAC_H
|
|
|
|
#include <linux/of.h>
|
|
#include <linux/of_mdio.h>
|
|
#include <linux/of_net.h>
|
|
#include <linux/phylink.h>
|
|
#include <linux/pcs-lynx.h>
|
|
|
|
#include "dpmac.h"
|
|
#include "dpmac-cmd.h"
|
|
|
|
struct dpaa2_mac {
|
|
struct fsl_mc_device *mc_dev;
|
|
struct dpmac_link_state state;
|
|
struct net_device *net_dev;
|
|
struct fsl_mc_io *mc_io;
|
|
struct dpmac_attr attr;
|
|
|
|
struct phylink_config phylink_config;
|
|
struct phylink *phylink;
|
|
phy_interface_t if_mode;
|
|
enum dpmac_link_type if_link_type;
|
|
struct lynx_pcs *pcs;
|
|
};
|
|
|
|
bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev,
|
|
struct fsl_mc_io *mc_io);
|
|
|
|
int dpaa2_mac_open(struct dpaa2_mac *mac);
|
|
|
|
void dpaa2_mac_close(struct dpaa2_mac *mac);
|
|
|
|
int dpaa2_mac_connect(struct dpaa2_mac *mac);
|
|
|
|
void dpaa2_mac_disconnect(struct dpaa2_mac *mac);
|
|
|
|
int dpaa2_mac_get_sset_count(void);
|
|
|
|
void dpaa2_mac_get_strings(u8 *data);
|
|
|
|
void dpaa2_mac_get_ethtool_stats(struct dpaa2_mac *mac, u64 *data);
|
|
|
|
#endif /* DPAA2_MAC_H */
|