From: Siva Durga Prasad Paladugu Date: Tue, 20 Feb 2018 06:26:19 +0000 (+0530) Subject: net: zynq_gem: Dont run any phy detection logic for GMII case X-Git-Tag: v2018.05-rc1~9^2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d77081cf50489a441739481e096411858c632276;p=u-boot net: zynq_gem: Dont run any phy detection logic for GMII case This patch bypasses phy detection logic for GMII interface and just depend on phy address received from DT. This patch is required as phy detection logic is different for some phys like xilinx phy which can be connected over SGMII and GMII interface. This fixes the issue of ethernet failures when xilinx phy is connected over GMII interface. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek Acked-by: Joe Hershberger --- diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 2cc49bca92..1390c36c61 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -325,7 +325,8 @@ static int zynq_phy_init(struct udevice *dev) /* Enable only MDIO bus */ writel(ZYNQ_GEM_NWCTRL_MDEN_MASK, ®s->nwctrl); - if (priv->interface != PHY_INTERFACE_MODE_SGMII) { + if ((priv->interface != PHY_INTERFACE_MODE_SGMII) && + (priv->interface != PHY_INTERFACE_MODE_GMII)) { ret = phy_detection(dev); if (ret) { printf("GEM PHY init failed\n");