linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] net: ethernet: arc: Probe emac after set RMII clock
@ 2015-12-23  9:19 Xing Zheng
  2015-12-23  9:19 ` [PATCH 2/4] net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs Xing Zheng
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Xing Zheng @ 2015-12-23  9:19 UTC (permalink / raw)
  To: linux-arm-kernel

After enter arc_emac_probe, emac will get_phy_id, phy_poll_reset and
other connecting PHY via mdiobus_read, so we need to set correct
ref clock rate for emac before probe emac.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
---

 drivers/net/ethernet/arc/emac_rockchip.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c
index c31c740..36e9eb1 100644
--- a/drivers/net/ethernet/arc/emac_rockchip.c
+++ b/drivers/net/ethernet/arc/emac_rockchip.c
@@ -164,10 +164,6 @@ static int emac_rockchip_probe(struct platform_device *pdev)
 		}
 	}
 
-	err = arc_emac_probe(ndev, interface);
-	if (err)
-		goto out_regulator_disable;
-
 	/* write-enable bits */
 	data = GRF_MODE_ENABLE_BIT | GRF_SPEED_ENABLE_BIT;
 
@@ -184,6 +180,13 @@ static int emac_rockchip_probe(struct platform_device *pdev)
 	err = clk_set_rate(priv->refclk, 50000000);
 	if (err)
 		dev_err(dev, "failed to change reference clock rate (%d)\n", err);
+
+	err = arc_emac_probe(ndev, interface);
+	if (err) {
+		dev_err(dev, "failed to probe arc emac (%d)\n", err);
+		goto out_regulator_disable;
+	}
+
 	return 0;
 
 out_regulator_disable:
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-28  7:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23  9:19 [PATCH 1/4] net: ethernet: arc: Probe emac after set RMII clock Xing Zheng
2015-12-23  9:19 ` [PATCH 2/4] net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs Xing Zheng
2015-12-23  9:19 ` [PATCH 3/4] net: ethernet: arc: Add support emac for RK3036 Xing Zheng
2015-12-23  9:19 ` [PATCH 4/4] ARM: dts: rockchip: " Xing Zheng
2015-12-23 19:52   ` kbuild test robot
2015-12-25  2:36   ` Caesar Wang
2015-12-28  5:14 ` [PATCH 1/4] net: ethernet: arc: Probe emac after set RMII clock David Miller
2015-12-28  7:27   ` Xing Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).