All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: gem: Disable PCS autonegotiation in case of fixed-link
@ 2020-05-14  6:48 Michal Simek
  2020-06-25  8:05 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2020-05-14  6:48 UTC (permalink / raw)
  To: u-boot

Disable PCS autonegotiation if fixed-link node is present in device tree.
This way systems with multiple GEM instances with a combination of
SGMII-fixed and SGMII-PHY will work.

Reported-by: Goran Marinkovic <goran.marinkovic@psi.ch>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
---

 drivers/net/zynq_gem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index a158824fc9fd..8cbe40dc75b1 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -448,8 +448,12 @@ static int zynq_gem_init(struct udevice *dev)
 		nwconfig |= ZYNQ_GEM_NWCFG_SGMII_ENBL |
 			    ZYNQ_GEM_NWCFG_PCS_SEL;
 #ifdef CONFIG_ARM64
+	if (priv->phydev->phy_id != PHY_FIXED_ID)
 		writel(readl(&regs->pcscntrl) | ZYNQ_GEM_PCS_CTL_ANEG_ENBL,
 		       &regs->pcscntrl);
+	else
+		writel(readl(&regs->pcscntrl) & ~ZYNQ_GEM_PCS_CTL_ANEG_ENBL,
+		       &regs->pcscntrl);
 #endif
 	}
 
-- 
2.26.2

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

* [PATCH] net: gem: Disable PCS autonegotiation in case of fixed-link
  2020-05-14  6:48 [PATCH] net: gem: Disable PCS autonegotiation in case of fixed-link Michal Simek
@ 2020-06-25  8:05 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2020-06-25  8:05 UTC (permalink / raw)
  To: u-boot

?t 14. 5. 2020 v 8:48 odes?latel Michal Simek <michal.simek@xilinx.com> napsal:
>
> Disable PCS autonegotiation if fixed-link node is present in device tree.
> This way systems with multiple GEM instances with a combination of
> SGMII-fixed and SGMII-PHY will work.
>
> Reported-by: Goran Marinkovic <goran.marinkovic@psi.ch>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> ---
>
>  drivers/net/zynq_gem.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index a158824fc9fd..8cbe40dc75b1 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -448,8 +448,12 @@ static int zynq_gem_init(struct udevice *dev)
>                 nwconfig |= ZYNQ_GEM_NWCFG_SGMII_ENBL |
>                             ZYNQ_GEM_NWCFG_PCS_SEL;
>  #ifdef CONFIG_ARM64
> +       if (priv->phydev->phy_id != PHY_FIXED_ID)
>                 writel(readl(&regs->pcscntrl) | ZYNQ_GEM_PCS_CTL_ANEG_ENBL,
>                        &regs->pcscntrl);
> +       else
> +               writel(readl(&regs->pcscntrl) & ~ZYNQ_GEM_PCS_CTL_ANEG_ENBL,
> +                      &regs->pcscntrl);
>  #endif
>         }
>
> --
> 2.26.2
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

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

end of thread, other threads:[~2020-06-25  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14  6:48 [PATCH] net: gem: Disable PCS autonegotiation in case of fixed-link Michal Simek
2020-06-25  8:05 ` Michal Simek

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.