]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: zynq_gem: Dont run any phy detection logic for GMII case
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tue, 20 Feb 2018 06:26:19 +0000 (11:56 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 21 Feb 2018 09:06:26 +0000 (10:06 +0100)
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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/zynq_gem.c

index fda55f3bf019ad5d44595dfd4ac7004297aa7514..002ea79dd8a0e1327a8a3fea000a02bf9e23b5ec 100644 (file)
@@ -326,7 +326,8 @@ static int zynq_phy_init(struct udevice *dev)
        /* Enable only MDIO bus */
        writel(ZYNQ_GEM_NWCTRL_MDEN_MASK, &regs->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");