diff options
author | Michal Simek <michal.simek@xilinx.com> | 2020-05-13 08:05:01 -0600 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-06-24 13:11:06 +0200 |
commit | 26e62cc9713ebe728d01826e8c22c3c56f8e3bf4 (patch) | |
tree | 969e1dddf7cbf6bd19dbdeace9dc620cff5db9a7 /drivers/net/zynq_gem.c | |
parent | 7831292fc94d9624b33b3418a73c35ece232b35e (diff) | |
download | u-boot-26e62cc9713ebe728d01826e8c22c3c56f8e3bf4.zip u-boot-26e62cc9713ebe728d01826e8c22c3c56f8e3bf4.tar.gz u-boot-26e62cc9713ebe728d01826e8c22c3c56f8e3bf4.tar.bz2 |
net: gem: Disable PCS autonegotiation in case of fixed-link
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>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/net/zynq_gem.c')
-rw-r--r-- | drivers/net/zynq_gem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 412daf7..da4b6fb 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -451,8 +451,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(®s->pcscntrl) | ZYNQ_GEM_PCS_CTL_ANEG_ENBL, ®s->pcscntrl); + else + writel(readl(®s->pcscntrl) & ~ZYNQ_GEM_PCS_CTL_ANEG_ENBL, + ®s->pcscntrl); #endif } |