Commit 8c2703f5 authored by Arınç ÜNAL's avatar Arınç ÜNAL Committed by Jakub Kicinski

net: dsa: mt7530: remove pad_setup function pointer

The pad_setup function pointer was introduced with 88bdef8b ("net: dsa:
mt7530: Extend device data ready for adding a new hardware"). It was being
used to set up the core clock and port 6 of the MT7530 switch, and pll of
the MT7531 switch.

All of these were moved to more appropriate locations, and it was never
used for the switch on the MT7988 SoC. Therefore, this function pointer
hasn't got a use anymore. Remove it.
Acked-by: default avatarDaniel Golle <daniel@makrotopia.org>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-5-d7d92a185cb1@arinc9.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 4ea4c040
...@@ -467,18 +467,6 @@ mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface) ...@@ -467,18 +467,6 @@ mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface)
core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN); core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
} }
static int
mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
{
return 0;
}
static int
mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
{
return 0;
}
static void static void
mt7531_pll_setup(struct mt7530_priv *priv) mt7531_pll_setup(struct mt7530_priv *priv)
{ {
...@@ -2603,14 +2591,6 @@ static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port, ...@@ -2603,14 +2591,6 @@ static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
} }
} }
static int
mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
{
struct mt7530_priv *priv = ds->priv;
return priv->info->pad_setup(ds, state->interface);
}
static int static int
mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode, mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
phy_interface_t interface) phy_interface_t interface)
...@@ -2776,8 +2756,6 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, ...@@ -2776,8 +2756,6 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
if (priv->p6_interface == state->interface) if (priv->p6_interface == state->interface)
break; break;
mt753x_pad_setup(ds, state);
if (mt753x_mac_config(ds, port, mode, state) < 0) if (mt753x_mac_config(ds, port, mode, state) < 0)
goto unsupported; goto unsupported;
...@@ -3094,11 +3072,6 @@ mt753x_conduit_state_change(struct dsa_switch *ds, ...@@ -3094,11 +3072,6 @@ mt753x_conduit_state_change(struct dsa_switch *ds,
mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val); mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
} }
static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
{
return 0;
}
static int mt7988_setup(struct dsa_switch *ds) static int mt7988_setup(struct dsa_switch *ds)
{ {
struct mt7530_priv *priv = ds->priv; struct mt7530_priv *priv = ds->priv;
...@@ -3162,7 +3135,6 @@ const struct mt753x_info mt753x_table[] = { ...@@ -3162,7 +3135,6 @@ const struct mt753x_info mt753x_table[] = {
.phy_write_c22 = mt7530_phy_write_c22, .phy_write_c22 = mt7530_phy_write_c22,
.phy_read_c45 = mt7530_phy_read_c45, .phy_read_c45 = mt7530_phy_read_c45,
.phy_write_c45 = mt7530_phy_write_c45, .phy_write_c45 = mt7530_phy_write_c45,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps, .mac_port_get_caps = mt7530_mac_port_get_caps,
.mac_port_config = mt7530_mac_config, .mac_port_config = mt7530_mac_config,
}, },
...@@ -3174,7 +3146,6 @@ const struct mt753x_info mt753x_table[] = { ...@@ -3174,7 +3146,6 @@ const struct mt753x_info mt753x_table[] = {
.phy_write_c22 = mt7530_phy_write_c22, .phy_write_c22 = mt7530_phy_write_c22,
.phy_read_c45 = mt7530_phy_read_c45, .phy_read_c45 = mt7530_phy_read_c45,
.phy_write_c45 = mt7530_phy_write_c45, .phy_write_c45 = mt7530_phy_write_c45,
.pad_setup = mt7530_pad_clk_setup,
.mac_port_get_caps = mt7530_mac_port_get_caps, .mac_port_get_caps = mt7530_mac_port_get_caps,
.mac_port_config = mt7530_mac_config, .mac_port_config = mt7530_mac_config,
}, },
...@@ -3186,7 +3157,6 @@ const struct mt753x_info mt753x_table[] = { ...@@ -3186,7 +3157,6 @@ const struct mt753x_info mt753x_table[] = {
.phy_write_c22 = mt7531_ind_c22_phy_write, .phy_write_c22 = mt7531_ind_c22_phy_write,
.phy_read_c45 = mt7531_ind_c45_phy_read, .phy_read_c45 = mt7531_ind_c45_phy_read,
.phy_write_c45 = mt7531_ind_c45_phy_write, .phy_write_c45 = mt7531_ind_c45_phy_write,
.pad_setup = mt7531_pad_setup,
.cpu_port_config = mt7531_cpu_port_config, .cpu_port_config = mt7531_cpu_port_config,
.mac_port_get_caps = mt7531_mac_port_get_caps, .mac_port_get_caps = mt7531_mac_port_get_caps,
.mac_port_config = mt7531_mac_config, .mac_port_config = mt7531_mac_config,
...@@ -3199,7 +3169,6 @@ const struct mt753x_info mt753x_table[] = { ...@@ -3199,7 +3169,6 @@ const struct mt753x_info mt753x_table[] = {
.phy_write_c22 = mt7531_ind_c22_phy_write, .phy_write_c22 = mt7531_ind_c22_phy_write,
.phy_read_c45 = mt7531_ind_c45_phy_read, .phy_read_c45 = mt7531_ind_c45_phy_read,
.phy_write_c45 = mt7531_ind_c45_phy_write, .phy_write_c45 = mt7531_ind_c45_phy_write,
.pad_setup = mt7988_pad_setup,
.cpu_port_config = mt7988_cpu_port_config, .cpu_port_config = mt7988_cpu_port_config,
.mac_port_get_caps = mt7988_mac_port_get_caps, .mac_port_get_caps = mt7988_mac_port_get_caps,
.mac_port_config = mt7988_mac_config, .mac_port_config = mt7988_mac_config,
...@@ -3229,9 +3198,8 @@ mt7530_probe_common(struct mt7530_priv *priv) ...@@ -3229,9 +3198,8 @@ mt7530_probe_common(struct mt7530_priv *priv)
/* Sanity check if these required device operations are filled /* Sanity check if these required device operations are filled
* properly. * properly.
*/ */
if (!priv->info->sw_setup || !priv->info->pad_setup || if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
!priv->info->phy_read_c22 || !priv->info->phy_write_c22 || !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps ||
!priv->info->mac_port_get_caps ||
!priv->info->mac_port_config) !priv->info->mac_port_config)
return -EINVAL; return -EINVAL;
......
...@@ -704,8 +704,6 @@ struct mt753x_pcs { ...@@ -704,8 +704,6 @@ struct mt753x_pcs {
* @phy_write_c22: Holding the way writing PHY port using C22 * @phy_write_c22: Holding the way writing PHY port using C22
* @phy_read_c45: Holding the way reading PHY port using C45 * @phy_read_c45: Holding the way reading PHY port using C45
* @phy_write_c45: Holding the way writing PHY port using C45 * @phy_write_c45: Holding the way writing PHY port using C45
* @pad_setup: Holding the way setting up the bus pad for a certain
* MAC port
* @phy_mode_supported: Check if the PHY type is being supported on a certain * @phy_mode_supported: Check if the PHY type is being supported on a certain
* port * port
* @mac_port_validate: Holding the way to set addition validate type for a * @mac_port_validate: Holding the way to set addition validate type for a
...@@ -726,7 +724,6 @@ struct mt753x_info { ...@@ -726,7 +724,6 @@ struct mt753x_info {
int regnum); int regnum);
int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad, int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad,
int regnum, u16 val); int regnum, u16 val);
int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
int (*cpu_port_config)(struct dsa_switch *ds, int port); int (*cpu_port_config)(struct dsa_switch *ds, int port);
void (*mac_port_get_caps)(struct dsa_switch *ds, int port, void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
struct phylink_config *config); struct phylink_config *config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment