All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero
@ 2016-03-18 16:37 Michal Simek
  2016-03-18 16:37 ` [U-Boot] [PATCH 2/2] net: xilinx_axi: Clear Isolate bit if found during phy setup Michal Simek
  2016-03-22 22:28 ` [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero Joe Hershberger
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Simek @ 2016-03-18 16:37 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Pass appropriate interface type to phy_connect
instead of zero.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/net/xilinx_axi_emac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 81274ee13bca..46b8d2d07ee9 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -251,7 +251,7 @@ static int axiemac_phy_init(struct udevice *dev)
 	}
 
 	/* Interface - look at tsec */
-	phydev = phy_connect(priv->bus, priv->phyaddr, dev, 0);
+	phydev = phy_connect(priv->bus, priv->phyaddr, dev, priv->interface);
 
 	phydev->supported &= supported;
 	phydev->advertising = phydev->supported;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] net: xilinx_axi: Clear Isolate bit if found during phy setup
  2016-03-18 16:37 [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero Michal Simek
@ 2016-03-18 16:37 ` Michal Simek
  2016-03-22 22:28   ` Joe Hershberger
  2016-03-22 22:28 ` [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero Joe Hershberger
  1 sibling, 1 reply; 4+ messages in thread
From: Michal Simek @ 2016-03-18 16:37 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

In SGMII cases the isolate bit might set after DMA and
ethernet resets and hence check and clear during
setup_phy if it was set.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/net/xilinx_axi_emac.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 46b8d2d07ee9..4c72702cbd48 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -269,6 +269,23 @@ static int setup_phy(struct udevice *dev)
 	struct axi_regs *regs = priv->iobase;
 	struct phy_device *phydev = priv->phydev;
 
+	if (priv->interface == PHY_INTERFACE_MODE_SGMII) {
+		/*
+		 * In SGMII cases the isolate bit might set
+		 * after DMA and ethernet resets and hence
+		 * check and clear if set.
+		 */
+		ret = phyread(priv, priv->phyaddr, MII_BMCR, &temp);
+		if (ret)
+			return 0;
+		if (temp & BMCR_ISOLATE) {
+			temp &= ~BMCR_ISOLATE;
+			ret = phywrite(priv, priv->phyaddr, MII_BMCR, temp);
+			if (ret)
+				return 0;
+		}
+	}
+
 	if (phy_startup(phydev)) {
 		printf("axiemac: could not initialize PHY %s\n",
 		       phydev->dev->name);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] net: xilinx_axi: Clear Isolate bit if found during phy setup
  2016-03-18 16:37 ` [U-Boot] [PATCH 2/2] net: xilinx_axi: Clear Isolate bit if found during phy setup Michal Simek
@ 2016-03-22 22:28   ` Joe Hershberger
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Hershberger @ 2016-03-22 22:28 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 18, 2016 at 11:37 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>
> In SGMII cases the isolate bit might set after DMA and
> ethernet resets and hence check and clear during
> setup_phy if it was set.
>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero
  2016-03-18 16:37 [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero Michal Simek
  2016-03-18 16:37 ` [U-Boot] [PATCH 2/2] net: xilinx_axi: Clear Isolate bit if found during phy setup Michal Simek
@ 2016-03-22 22:28 ` Joe Hershberger
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Hershberger @ 2016-03-22 22:28 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 18, 2016 at 11:37 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>
> Pass appropriate interface type to phy_connect
> instead of zero.
>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-22 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 16:37 [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero Michal Simek
2016-03-18 16:37 ` [U-Boot] [PATCH 2/2] net: xilinx_axi: Clear Isolate bit if found during phy setup Michal Simek
2016-03-22 22:28   ` Joe Hershberger
2016-03-22 22:28 ` [U-Boot] [PATCH 1/2] net: xilinx_axi: use interface type instead of zero Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.