From: Xing Zheng <zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
Xing Zheng <zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
keescook-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
leozwang-hpIqsD4AKlcxg7vii5yOFA@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [RESEND PATCH v1 1/4] net: ethernet: arc: Probe emac after set RMII clock
Date: Mon, 28 Dec 2015 15:22:18 +0800 [thread overview]
Message-ID: <1451287341-16453-2-git-send-email-zhengxing@rock-chips.com> (raw)
In-Reply-To: <1451287341-16453-1-git-send-email-zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
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-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
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
next prev parent reply other threads:[~2015-12-28 7:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-28 7:22 [RESEND PATCH v1 0/4] Add support emac for the RK3036 SoC platform Xing Zheng
2015-12-28 7:22 ` [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036 Xing Zheng
2015-12-29 22:59 ` Florian Fainelli
2015-12-29 23:32 ` Heiko Stübner
2016-01-01 12:55 ` Arnd Bergmann
2016-01-02 2:38 ` Xing Zheng
[not found] ` <1451287341-16453-1-git-send-email-zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-28 7:22 ` Xing Zheng [this message]
2015-12-28 7:22 ` [RESEND PATCH v1 2/4] net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs Xing Zheng
2015-12-29 20:53 ` [RESEND PATCH v1 0/4] Add support emac for the RK3036 SoC platform David Miller
2015-12-29 22:27 ` Heiko Stübner
2015-12-29 22:56 ` Florian Fainelli
2015-12-30 1:48 ` David Miller
[not found] ` <20151229.204847.578920480799799256.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-12-30 10:17 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVEj6MGtUPYLmGCtMcLxKs4rLoh+if23_Bk1p=qwQM_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-30 15:03 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1451287341-16453-2-git-send-email-zhengxing@rock-chips.com \
--to=zhengxing-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=keescook-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=leozwang-hpIqsD4AKlcxg7vii5yOFA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox