Commit 2ca9b2aa authored by Shawn Guo's avatar Shawn Guo Committed by David S. Miller

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: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d2e553bc
...@@ -1593,8 +1593,6 @@ fec_probe(struct platform_device *pdev) ...@@ -1593,8 +1593,6 @@ fec_probe(struct platform_device *pdev)
fep->phy_interface = ret; fep->phy_interface = ret;
} }
fec_reset_phy(pdev);
for (i = 0; i < FEC_IRQ_NUM; i++) { for (i = 0; i < FEC_IRQ_NUM; i++) {
irq = platform_get_irq(pdev, i); irq = platform_get_irq(pdev, i);
if (irq < 0) { if (irq < 0) {
...@@ -1634,6 +1632,8 @@ fec_probe(struct platform_device *pdev) ...@@ -1634,6 +1632,8 @@ fec_probe(struct platform_device *pdev)
clk_prepare_enable(fep->clk_ahb); clk_prepare_enable(fep->clk_ahb);
clk_prepare_enable(fep->clk_ipg); clk_prepare_enable(fep->clk_ipg);
fec_reset_phy(pdev);
ret = fec_enet_init(ndev); ret = fec_enet_init(ndev);
if (ret) if (ret)
goto failed_init; goto failed_init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment