diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/net/dsa/ocelot/felix.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.c')
| -rw-r--r-- | drivers/net/dsa/ocelot/felix.c | 24 | 
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index d4cc9e60f369..80861ac090ae 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -1056,6 +1056,17 @@ static void felix_phylink_get_caps(struct dsa_switch *ds, int port,  		  config->supported_interfaces);  } +static void felix_phylink_mac_config(struct dsa_switch *ds, int port, +				     unsigned int mode, +				     const struct phylink_link_state *state) +{ +	struct ocelot *ocelot = ds->priv; +	struct felix *felix = ocelot_to_felix(ocelot); + +	if (felix->info->phylink_mac_config) +		felix->info->phylink_mac_config(ocelot, port, mode, state); +} +  static struct phylink_pcs *felix_phylink_mac_select_pcs(struct dsa_switch *ds,  							int port,  							phy_interface_t iface) @@ -1539,11 +1550,6 @@ static int felix_connect_tag_protocol(struct dsa_switch *ds,  	}  } -/* Hardware initialization done here so that we can allocate structures with - * devm without fear of dsa_register_switch returning -EPROBE_DEFER and causing - * us to allocate structures twice (leak memory) and map PCI memory twice - * (which will not work). - */  static int felix_setup(struct dsa_switch *ds)  {  	struct ocelot *ocelot = ds->priv; @@ -1555,6 +1561,9 @@ static int felix_setup(struct dsa_switch *ds)  	if (err)  		return err; +	if (ocelot->targets[HSIO]) +		ocelot_pll5_init(ocelot); +  	err = ocelot_init(ocelot);  	if (err)  		goto out_mdiobus_free; @@ -1571,6 +1580,10 @@ static int felix_setup(struct dsa_switch *ds)  	dsa_switch_for_each_available_port(dp, ds) {  		ocelot_init_port(ocelot, dp->index); +		if (felix->info->configure_serdes) +			felix->info->configure_serdes(ocelot, dp->index, +						      dp->dn); +  		/* Set the default QoS Classification based on PCP and DEI  		 * bits of vlan tag.  		 */ @@ -2085,6 +2098,7 @@ const struct dsa_switch_ops felix_switch_ops = {  	.get_sset_count			= felix_get_sset_count,  	.get_ts_info			= felix_get_ts_info,  	.phylink_get_caps		= felix_phylink_get_caps, +	.phylink_mac_config		= felix_phylink_mac_config,  	.phylink_mac_select_pcs		= felix_phylink_mac_select_pcs,  	.phylink_mac_link_down		= felix_phylink_mac_link_down,  	.phylink_mac_link_up		= felix_phylink_mac_link_up,  |