diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-06-26 23:45:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-28 00:22:05 -0400 |
commit | 2ca9b2aa0d5a43e954789e0da675a826b83932b7 (patch) | |
tree | 215e82c4d767ee066082f973f765baa90db66e25 | |
parent | d2e553bca89596b7ac35f8abcec9c9b93f772fc2 (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/freescale/fec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index ff7f4c5115a1..e868a377c898 100644 --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c | |||
@@ -1593,8 +1593,6 @@ fec_probe(struct platform_device *pdev) | |||
1593 | fep->phy_interface = ret; | 1593 | fep->phy_interface = ret; |
1594 | } | 1594 | } |
1595 | 1595 | ||
1596 | fec_reset_phy(pdev); | ||
1597 | |||
1598 | for (i = 0; i < FEC_IRQ_NUM; i++) { | 1596 | for (i = 0; i < FEC_IRQ_NUM; i++) { |
1599 | irq = platform_get_irq(pdev, i); | 1597 | irq = platform_get_irq(pdev, i); |
1600 | if (irq < 0) { | 1598 | if (irq < 0) { |
@@ -1634,6 +1632,8 @@ fec_probe(struct platform_device *pdev) | |||
1634 | clk_prepare_enable(fep->clk_ahb); | 1632 | clk_prepare_enable(fep->clk_ahb); |
1635 | clk_prepare_enable(fep->clk_ipg); | 1633 | clk_prepare_enable(fep->clk_ipg); |
1636 | 1634 | ||
1635 | fec_reset_phy(pdev); | ||
1636 | |||
1637 | ret = fec_enet_init(ndev); | 1637 | ret = fec_enet_init(ndev); |
1638 | if (ret) | 1638 | if (ret) |
1639 | goto failed_init; | 1639 | goto failed_init; |