summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-08-16 12:19:34 +0200
committerDavid S. Miller <davem@davemloft.net>2021-08-16 12:19:34 +0200
commit793ee362b0aba2b662d359812941752c13c9060d (patch)
tree06354a72d4af052c362d3915177e0204f5bc926f /include
parents390/net: replace in_irq() with in_hardirq() (diff)
parentnet: mscc: ocelot: convert to phylink (diff)
downloadlinux-793ee362b0aba2b662d359812941752c13c9060d.tar.xz
linux-793ee362b0aba2b662d359812941752c13c9060d.zip
Merge branch 'ocelot-phylink'
Vladimir Oltean says: ==================== Convert ocelot to phylink The ocelot switchdev and felix dsa drivers are interesting because they target the same class of hardware switches but used in different modes. Colin has an interesting use case where he wants to use a hardware switch supported by the ocelot switchdev driver with the felix dsa driver. So far, the existing hardware revisions were similar between the ocelot and felix drivers, but not completely identical. With identical hardware, it is absurd that the felix driver uses phylink while the ocelot driver uses phylib - this should not be one of the differences between the switchdev and dsa driver, and we could eliminate it. Colin will need the common phylink support in ocelot and felix when adding a phylink_pcs driver for the PCS1G block inside VSC7514, which will make the felix driver work with either the NXP or the Microchip PCS. As usual, Alex, Horatiu, sorry for bugging you, but it would be appreciated if you could give this a quick run on actual VSC7514 hardware (which I don't have) to make sure I'm not introducing any breakage. ==================== Fixes: 0f06a6787e05 ("samples: Add an IPv6 "-6" option to the pktgen scripts") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/soc/mscc/ocelot.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 2f5ce4d4fdbf..fb5681f7e61b 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -589,6 +589,9 @@ enum ocelot_sb_pool {
OCELOT_SB_POOL_NUM,
};
+#define OCELOT_QUIRK_PCS_PERFORMS_RATE_ADAPTATION BIT(0)
+#define OCELOT_QUIRK_QSGMII_PORTS_MUST_BE_UP BIT(1)
+
struct ocelot_port {
struct ocelot *ocelot;
@@ -798,18 +801,12 @@ void ocelot_init_port(struct ocelot *ocelot, int port);
void ocelot_deinit_port(struct ocelot *ocelot, int port);
/* DSA callbacks */
-void ocelot_port_enable(struct ocelot *ocelot, int port,
- struct phy_device *phy);
-void ocelot_port_disable(struct ocelot *ocelot, int port);
void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data);
void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data);
int ocelot_get_sset_count(struct ocelot *ocelot, int port, int sset);
int ocelot_get_ts_info(struct ocelot *ocelot, int port,
struct ethtool_ts_info *info);
void ocelot_set_ageing_time(struct ocelot *ocelot, unsigned int msecs);
-int ocelot_port_flush(struct ocelot *ocelot, int port);
-void ocelot_adjust_link(struct ocelot *ocelot, int port,
- struct phy_device *phydev);
int ocelot_port_vlan_filtering(struct ocelot *ocelot, int port, bool enabled);
void ocelot_bridge_stp_state_set(struct ocelot *ocelot, int port, u8 state);
void ocelot_apply_bridge_fwd_mask(struct ocelot *ocelot);
@@ -894,6 +891,18 @@ int ocelot_sb_occ_tc_port_bind_get(struct ocelot *ocelot, int port,
enum devlink_sb_pool_type pool_type,
u32 *p_cur, u32 *p_max);
+void ocelot_phylink_mac_link_down(struct ocelot *ocelot, int port,
+ unsigned int link_an_mode,
+ phy_interface_t interface,
+ unsigned long quirks);
+void ocelot_phylink_mac_link_up(struct ocelot *ocelot, int port,
+ struct phy_device *phydev,
+ unsigned int link_an_mode,
+ phy_interface_t interface,
+ int speed, int duplex,
+ bool tx_pause, bool rx_pause,
+ unsigned long quirks);
+
#if IS_ENABLED(CONFIG_BRIDGE_MRP)
int ocelot_mrp_add(struct ocelot *ocelot, int port,
const struct switchdev_obj_mrp *mrp);