net: dsa: b53: unexport and move b53_eee_enable_set()
After commit f86ad77faf24 ("net: dsa: bcm_sf2: Utilize b53_{enable, disable}_port"), bcm_sf2.c no longer calls b53_eee_enable_set(), and all its callers are in b53_common.c. We also need to move it, because it is called within b53_common.c before its definition, and we want to avoid forward declarations. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Simon Horman <horms@kernel.org> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20240206112527.4132299-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ef61f5528f
commit
a2e520643b
@ -559,6 +559,19 @@ static void b53_port_set_learning(struct b53_device *dev, int port,
|
|||||||
b53_write16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, reg);
|
b53_write16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable)
|
||||||
|
{
|
||||||
|
struct b53_device *dev = ds->priv;
|
||||||
|
u16 reg;
|
||||||
|
|
||||||
|
b53_read16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, ®);
|
||||||
|
if (enable)
|
||||||
|
reg |= BIT(port);
|
||||||
|
else
|
||||||
|
reg &= ~BIT(port);
|
||||||
|
b53_write16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, reg);
|
||||||
|
}
|
||||||
|
|
||||||
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
|
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
|
||||||
{
|
{
|
||||||
struct b53_device *dev = ds->priv;
|
struct b53_device *dev = ds->priv;
|
||||||
@ -2193,21 +2206,6 @@ void b53_mirror_del(struct dsa_switch *ds, int port,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(b53_mirror_del);
|
EXPORT_SYMBOL(b53_mirror_del);
|
||||||
|
|
||||||
void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable)
|
|
||||||
{
|
|
||||||
struct b53_device *dev = ds->priv;
|
|
||||||
u16 reg;
|
|
||||||
|
|
||||||
b53_read16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, ®);
|
|
||||||
if (enable)
|
|
||||||
reg |= BIT(port);
|
|
||||||
else
|
|
||||||
reg &= ~BIT(port);
|
|
||||||
b53_write16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, reg);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(b53_eee_enable_set);
|
|
||||||
|
|
||||||
|
|
||||||
/* Returns 0 if EEE was not enabled, or 1 otherwise
|
/* Returns 0 if EEE was not enabled, or 1 otherwise
|
||||||
*/
|
*/
|
||||||
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
|
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
|
||||||
|
@ -395,7 +395,6 @@ void b53_mirror_del(struct dsa_switch *ds, int port,
|
|||||||
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
|
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
|
||||||
void b53_disable_port(struct dsa_switch *ds, int port);
|
void b53_disable_port(struct dsa_switch *ds, int port);
|
||||||
void b53_brcm_hdr_setup(struct dsa_switch *ds, int port);
|
void b53_brcm_hdr_setup(struct dsa_switch *ds, int port);
|
||||||
void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable);
|
|
||||||
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy);
|
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy);
|
||||||
int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
|
int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
|
||||||
int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
|
int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user