Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724894 > unrolled thread

[PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link irq

Started byAntoine Tenart <antoine.tenart@free-electrons.com>
First post2017-09-01 11:10 +0200
Last post2017-09-01 19:10 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link irq Antoine Tenart <antoine.tenart@free-electrons.com> - 2017-09-01 11:10 +0200
    [PATCH net-next v2 4/4] Documentation/bindings: net: marvell-pp2: add the link interrupt Antoine Tenart <antoine.tenart@free-electrons.com> - 2017-09-01 11:10 +0200
      Re: [PATCH net-next v2 4/4] Documentation/bindings: net:  marvell-pp2: add the link interrupt Andrew Lunn <andrew@lunn.ch> - 2017-09-01 15:40 +0200
    [PATCH net-next v2 1/4] net: mvpp2: take advantage of the is_rgmii helper Antoine Tenart <antoine.tenart@free-electrons.com> - 2017-09-01 11:10 +0200
      Re: [PATCH net-next v2 1/4] net: mvpp2: take advantage of the  is_rgmii helper Andrew Lunn <andrew@lunn.ch> - 2017-09-01 15:40 +0200
    Re: [PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link  irq David Miller <davem@davemloft.net> - 2017-09-01 19:10 +0200

#1724894 — [PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link irq

FromAntoine Tenart <antoine.tenart@free-electrons.com>
Date2017-09-01 11:10 +0200
Subject[PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link irq
Message-ID<ukQ7D-1Qk-3@gated-at.bofh.it>
Hi all,

This series aims at making the driver work when no PHY is connected
between a port and the physical layer and not described as a fixed-phy.
This is useful for some usecases such as when a switch is connected
directly to the serdes lanes. It can also be used for SFP ports on the
7k-db and 8k-db while waiting for the phylink support to land in (which
should be part of another series).

This series makes the phy optional in the PPv2 driver, and then adds
the support for the GoP port link interrupt to handle link status
changes on such ports.

This was tested using the SFP ports on the 7k-db and 8k-db boards.

Thanks!
Antoine

Since v1:
  - Now use phy_interface_mode_is_rgmii() in the GoP link patch.
  - Added one cosmetic patch to take advantage of phy_interface_mode_is_rgmii()
    in the whole PPv2 driver.

Antoine Tenart (4):
  net: mvpp2: take advantage of the is_rgmii helper
  net: mvpp2: make the phy optional
  net: mvpp2: use the GoP interrupt for link status changes
  Documentation/bindings: net: marvell-pp2: add the link interrupt

 .../devicetree/bindings/net/marvell-pp2.txt        |   2 +-
 drivers/net/ethernet/marvell/mvpp2.c               | 211 ++++++++++++++++++---
 2 files changed, 187 insertions(+), 26 deletions(-)

-- 
2.13.5

[toc] | [next] | [standalone]


#1724895 — [PATCH net-next v2 4/4] Documentation/bindings: net: marvell-pp2: add the link interrupt

FromAntoine Tenart <antoine.tenart@free-electrons.com>
Date2017-09-01 11:10 +0200
Subject[PATCH net-next v2 4/4] Documentation/bindings: net: marvell-pp2: add the link interrupt
Message-ID<ukQ7E-1Qk-19@gated-at.bofh.it>
In reply to#1724894
A link interrupt can be described. Document this valid interrupt name.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
---
 Documentation/devicetree/bindings/net/marvell-pp2.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/marvell-pp2.txt b/Documentation/devicetree/bindings/net/marvell-pp2.txt
index 49484db81583..c78f3187dfea 100644
--- a/Documentation/devicetree/bindings/net/marvell-pp2.txt
+++ b/Documentation/devicetree/bindings/net/marvell-pp2.txt
@@ -44,7 +44,7 @@ Optional properties (port):
 - interrupt-names: if more than a single interrupt for rx is given, must
                    be the name associated to the interrupts listed. Valid
                    names are: "tx-cpu0", "tx-cpu1", "tx-cpu2", "tx-cpu3",
-		   "rx-shared".
+		   "rx-shared", "link".
 - marvell,system-controller: a phandle to the system controller.
 
 Example for marvell,armada-375-pp2:
-- 
2.13.5

[toc] | [prev] | [next] | [standalone]


#1725091 — Re: [PATCH net-next v2 4/4] Documentation/bindings: net: marvell-pp2: add the link interrupt

FromAndrew Lunn <andrew@lunn.ch>
Date2017-09-01 15:40 +0200
SubjectRe: [PATCH net-next v2 4/4] Documentation/bindings: net: marvell-pp2: add the link interrupt
Message-ID<ukUkX-5wR-55@gated-at.bofh.it>
In reply to#1724895
On Fri, Sep 01, 2017 at 11:04:55AM +0200, Antoine Tenart wrote:
> A link interrupt can be described. Document this valid interrupt name.
> 
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
> Tested-by: Marcin Wojtas <mw@semihalf.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1724896 — [PATCH net-next v2 1/4] net: mvpp2: take advantage of the is_rgmii helper

FromAntoine Tenart <antoine.tenart@free-electrons.com>
Date2017-09-01 11:10 +0200
Subject[PATCH net-next v2 1/4] net: mvpp2: take advantage of the is_rgmii helper
Message-ID<ukQ7E-1Qk-23@gated-at.bofh.it>
In reply to#1724894
Convert all RGMII checks to use the phy_interface_mode_is_rgmii()
helper. This is a cosmetic patch.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 drivers/net/ethernet/marvell/mvpp2.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index 9e64b1ba3d43..f93d3a332c60 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -4463,10 +4463,7 @@ static void mvpp2_port_mii_gmac_configure_mode(struct mvpp2_port *port)
 		val |= MVPP2_GMAC_DISABLE_PADDING;
 		val &= ~MVPP2_GMAC_FLOW_CTRL_MASK;
 		writel(val, port->base + MVPP2_GMAC_CTRL_2_REG);
-	} else if (port->phy_interface == PHY_INTERFACE_MODE_RGMII ||
-		   port->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
-		   port->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID ||
-		   port->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) {
+	} else if (phy_interface_mode_is_rgmii(port->phy_interface)) {
 		val = readl(port->base + MVPP22_GMAC_CTRL_4_REG);
 		val |= MVPP22_CTRL4_EXT_PIN_GMII_SEL |
 		       MVPP22_CTRL4_SYNC_BYPASS_DIS |
@@ -4512,10 +4509,7 @@ static void mvpp2_port_mii_gmac_configure(struct mvpp2_port *port)
 	val = readl(port->base + MVPP2_GMAC_CTRL_2_REG);
 	if (port->phy_interface == PHY_INTERFACE_MODE_SGMII) {
 	        val |= MVPP2_GMAC_INBAND_AN_MASK | MVPP2_GMAC_PCS_ENABLE_MASK;
-	} else if (port->phy_interface == PHY_INTERFACE_MODE_RGMII ||
-		   port->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
-		   port->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID ||
-		   port->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) {
+	} else if (phy_interface_mode_is_rgmii(port->phy_interface)) {
 		val &= ~MVPP2_GMAC_PCS_ENABLE_MASK;
 		val |= MVPP2_GMAC_PORT_RGMII_MASK;
 	}
@@ -4575,10 +4569,7 @@ static void mvpp2_port_mii_set(struct mvpp2_port *port)
 	if (port->priv->hw_version == MVPP22)
 		mvpp22_port_mii_set(port);
 
-	if (port->phy_interface == PHY_INTERFACE_MODE_RGMII ||
-	    port->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
-	    port->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID ||
-	    port->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID ||
+	if (phy_interface_mode_is_rgmii(port->phy_interface) ||
 	    port->phy_interface == PHY_INTERFACE_MODE_SGMII)
 		mvpp2_port_mii_gmac_configure(port);
 	else if (port->phy_interface == PHY_INTERFACE_MODE_10GKR)
-- 
2.13.5

[toc] | [prev] | [next] | [standalone]


#1725101 — Re: [PATCH net-next v2 1/4] net: mvpp2: take advantage of the is_rgmii helper

FromAndrew Lunn <andrew@lunn.ch>
Date2017-09-01 15:40 +0200
SubjectRe: [PATCH net-next v2 1/4] net: mvpp2: take advantage of the is_rgmii helper
Message-ID<ukUkY-5wR-77@gated-at.bofh.it>
In reply to#1724896
On Fri, Sep 01, 2017 at 11:04:52AM +0200, Antoine Tenart wrote:
> Convert all RGMII checks to use the phy_interface_mode_is_rgmii()
> helper. This is a cosmetic patch.
> 
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1725235 — Re: [PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link irq

FromDavid Miller <davem@davemloft.net>
Date2017-09-01 19:10 +0200
SubjectRe: [PATCH net-next v2 0/4] net: mvpp2: optional PHYs and GoP link irq
Message-ID<ukXCa-81A-9@gated-at.bofh.it>
In reply to#1724894
From: Antoine Tenart <antoine.tenart@free-electrons.com>
Date: Fri,  1 Sep 2017 11:04:51 +0200

> This series aims at making the driver work when no PHY is connected
> between a port and the physical layer and not described as a fixed-phy.
> This is useful for some usecases such as when a switch is connected
> directly to the serdes lanes. It can also be used for SFP ports on the
> 7k-db and 8k-db while waiting for the phylink support to land in (which
> should be part of another series).
> 
> This series makes the phy optional in the PPv2 driver, and then adds
> the support for the GoP port link interrupt to handle link status
> changes on such ports.
> 
> This was tested using the SFP ports on the 7k-db and 8k-db boards.

Series applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web