forked from Minki/linux
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 <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
40bc8b065e
commit
bedd00c81b
@ -498,10 +498,8 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
|
|||||||
struct device_node *dn)
|
struct device_node *dn)
|
||||||
{
|
{
|
||||||
struct device_node *port;
|
struct device_node *port;
|
||||||
const char *phy_mode_str;
|
|
||||||
int mode;
|
int mode;
|
||||||
unsigned int port_num;
|
unsigned int port_num;
|
||||||
int ret;
|
|
||||||
|
|
||||||
priv->moca_port = -1;
|
priv->moca_port = -1;
|
||||||
|
|
||||||
@ -515,15 +513,11 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
|
|||||||
* time
|
* time
|
||||||
*/
|
*/
|
||||||
mode = of_get_phy_mode(port);
|
mode = of_get_phy_mode(port);
|
||||||
if (mode < 0) {
|
if (mode < 0)
|
||||||
ret = of_property_read_string(port, "phy-mode",
|
continue;
|
||||||
&phy_mode_str);
|
|
||||||
if (ret < 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (!strcasecmp(phy_mode_str, "internal"))
|
if (mode == PHY_INTERFACE_MODE_INTERNAL)
|
||||||
priv->int_phy_mask |= 1 << port_num;
|
priv->int_phy_mask |= 1 << port_num;
|
||||||
}
|
|
||||||
|
|
||||||
if (mode == PHY_INTERFACE_MODE_MOCA)
|
if (mode == PHY_INTERFACE_MODE_MOCA)
|
||||||
priv->moca_port = port_num;
|
priv->moca_port = port_num;
|
||||||
|
Loading…
Reference in New Issue
Block a user