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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
Siva Durga Prasad Paladugu 2018-02-20 11:56:19 +05:30 committed by Michal Simek
parent 51916864b3
commit d77081cf50

View File

@ -325,7 +325,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");