Skip to content

Commit bedd00c

Browse files
ffainellidavem330
authored andcommitted
net: dsa: bcm_sf2: Remove special handling of "internal" phy-mode
The PHY library now supports an "internal" phy-mode, thus making our custom parsing code now unnecessary. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 40bc8b0 commit bedd00c

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

drivers/net/dsa/bcm_sf2.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,8 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
498498
struct device_node *dn)
499499
{
500500
struct device_node *port;
501-
const char *phy_mode_str;
502501
int mode;
503502
unsigned int port_num;
504-
int ret;
505503

506504
priv->moca_port = -1;
507505

@@ -515,15 +513,11 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
515513
* time
516514
*/
517515
mode = of_get_phy_mode(port);
518-
if (mode < 0) {
519-
ret = of_property_read_string(port, "phy-mode",
520-
&phy_mode_str);
521-
if (ret < 0)
522-
continue;
523-
524-
if (!strcasecmp(phy_mode_str, "internal"))
525-
priv->int_phy_mask |= 1 << port_num;
526-
}
516+
if (mode < 0)
517+
continue;
518+
519+
if (mode == PHY_INTERFACE_MODE_INTERNAL)
520+
priv->int_phy_mask |= 1 << port_num;
527521

528522
if (mode == PHY_INTERFACE_MODE_MOCA)
529523
priv->moca_port = port_num;

0 commit comments

Comments
 (0)