Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: fec: reset phy after pinctrl setup

In case that bootloader or platform initialization does not set up
fec pins, the fec_reset_phy will not be able to succeed, because
fec_reset_phy is currently called before devm_pinctrl_get_select_default.
Move fec_reset_phy call to the place between devm_pinctrl_get_select_default
and fec_enet_init to have above case be taken care.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Shawn Guo and committed by
David S. Miller
2ca9b2aa d2e553bc

+2 -2
+2 -2
drivers/net/ethernet/freescale/fec.c
··· 1593 1593 fep->phy_interface = ret; 1594 1594 } 1595 1595 1596 - fec_reset_phy(pdev); 1597 - 1598 1596 for (i = 0; i < FEC_IRQ_NUM; i++) { 1599 1597 irq = platform_get_irq(pdev, i); 1600 1598 if (irq < 0) { ··· 1631 1633 1632 1634 clk_prepare_enable(fep->clk_ahb); 1633 1635 clk_prepare_enable(fep->clk_ipg); 1636 + 1637 + fec_reset_phy(pdev); 1634 1638 1635 1639 ret = fec_enet_init(ndev); 1636 1640 if (ret)