1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */
3 * Copyright 2008 - 2015 Freescale Semiconductor Inc.
9 #include <linux/device.h>
10 #include <linux/if_ether.h>
11 #include <linux/phy.h>
12 #include <linux/list.h>
14 #include "fman_port.h"
26 struct fman_port *port[2];
28 struct phy_device *phy_dev;
29 phy_interface_t phy_if;
30 struct device_node *phy_node;
31 struct net_device *net_dev;
41 int (*enable)(struct fman_mac *mac_dev);
42 void (*disable)(struct fman_mac *mac_dev);
43 void (*adjust_link)(struct mac_device *mac_dev);
44 int (*set_promisc)(struct fman_mac *mac_dev, bool enable);
45 int (*change_addr)(struct fman_mac *mac_dev, const enet_addr_t *enet_addr);
46 int (*set_allmulti)(struct fman_mac *mac_dev, bool enable);
47 int (*set_tstamp)(struct fman_mac *mac_dev, bool enable);
48 int (*set_multi)(struct net_device *net_dev,
49 struct mac_device *mac_dev);
50 int (*set_rx_pause)(struct fman_mac *mac_dev, bool en);
51 int (*set_tx_pause)(struct fman_mac *mac_dev, u8 priority,
52 u16 pause_time, u16 thresh_time);
53 int (*set_exception)(struct fman_mac *mac_dev,
54 enum fman_mac_exceptions exception, bool enable);
55 int (*add_hash_mac_addr)(struct fman_mac *mac_dev,
56 enet_addr_t *eth_addr);
57 int (*remove_hash_mac_addr)(struct fman_mac *mac_dev,
58 enet_addr_t *eth_addr);
60 void (*update_speed)(struct mac_device *mac_dev, int speed);
62 struct fman_mac *fman_mac;
63 struct mac_priv_s *priv;
66 struct dpaa_eth_data {
67 struct mac_device *mac_dev;
72 extern const char *mac_driver_description;
74 int fman_set_mac_active_pause(struct mac_device *mac_dev, bool rx, bool tx);
76 void fman_get_pause_cfg(struct mac_device *mac_dev, bool *rx_pause,
78 int fman_set_multi(struct net_device *net_dev, struct mac_device *mac_dev);