From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@ver.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
"David S. Miller" <davem@davemloft.net>,
Sean Wang <sean.wang@mediatek.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
david.wu@rock-chips.com, opendmb@gmail.com
Subject: [PATCH 4/4] net: dsa: bcm_sf2: Remove special handling of "internal" phy-mode
Date: Fri, 23 Jun 2017 10:31:35 -0700 [thread overview]
Message-ID: <20170623173135.22912-5-f.fainelli@gmail.com> (raw)
In-Reply-To: <20170623173135.22912-1-f.fainelli@gmail.com>
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>
---
drivers/net/dsa/bcm_sf2.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 76e98e8ed315..648f91b58d1e 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -498,10 +498,8 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
struct device_node *dn)
{
struct device_node *port;
- const char *phy_mode_str;
int mode;
unsigned int port_num;
- int ret;
priv->moca_port = -1;
@@ -515,15 +513,11 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
* time
*/
mode = of_get_phy_mode(port);
- if (mode < 0) {
- ret = of_property_read_string(port, "phy-mode",
- &phy_mode_str);
- if (ret < 0)
- continue;
-
- if (!strcasecmp(phy_mode_str, "internal"))
- priv->int_phy_mask |= 1 << port_num;
- }
+ if (mode < 0)
+ continue;
+
+ if (mode == PHY_INTERFACE_MODE_INTERNAL)
+ priv->int_phy_mask |= 1 << port_num;
if (mode == PHY_INTERFACE_MODE_MOCA)
priv->moca_port = port_num;
--
2.9.3
prev parent reply other threads:[~2017-06-23 17:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 17:31 [PATCH 0/4] net: phy: Support "internal" PHY interface Florian Fainelli
2017-06-23 17:31 ` [PATCH 1/4] dt-bindings: Add "internal" as a valid 'phy-mode' property Florian Fainelli
[not found] ` <20170623173135.22912-2-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-26 19:43 ` Rob Herring
2017-06-26 19:44 ` Florian Fainelli
2017-06-23 17:31 ` [PATCH 2/4] net: phy: Support "internal" PHY interface Florian Fainelli
2017-06-23 17:31 ` [PATCH 3/4] net: bcmgenet: Remove special handling of "internal" phy-mode Florian Fainelli
2017-06-23 17:31 ` Florian Fainelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170623173135.22912-5-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.wu@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=netdev@ver.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).